From 540af2d96facfd7d8e3e7f8dacc43a92575460b4 Mon Sep 17 00:00:00 2001 From: Sam M W Date: Wed, 19 May 2021 21:36:20 +0100 Subject: [PATCH 1/2] src/generate.py is now compatible with Python3 --- src/generate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generate.py b/src/generate.py index f785f0f..42d7fc2 100644 --- a/src/generate.py +++ b/src/generate.py @@ -103,7 +103,7 @@ def apply_defaults(params, defaults): try: if params is None: params = defaults - if type(params) in [str, unicode, int, long, float]: + if type(params) in [str, int, float]: pass elif isinstance(params, list): # If there is a default entry, the list must be length one @@ -126,7 +126,7 @@ def apply_defaults(params, defaults): raise ValueError("Params dictionary met with non-dictionary default: {}, {}".format(params, defaults)) else: raise RuntimeException("Unable to apply defaults to {} (from {})".format(params, defaults)) - except TypeError, e: + except TypeError as e: raise TypeError("TypeError: Unable to apply defaults to {} (from {})".format(params, defaults)) return params From 1df9f2fc2204b78d7598b6c89773a67c6be50120 Mon Sep 17 00:00:00 2001 From: Sam M W Date: Wed, 19 May 2021 21:38:18 +0100 Subject: [PATCH 2/2] Need to include for bruteforceByCost to compile --- src/algorithms/bruteforceByCost.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/algorithms/bruteforceByCost.hpp b/src/algorithms/bruteforceByCost.hpp index 87144b4..f7ab8c7 100644 --- a/src/algorithms/bruteforceByCost.hpp +++ b/src/algorithms/bruteforceByCost.hpp @@ -5,6 +5,7 @@ #include #include #include +#include /*! \class bruteforceByCost