You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that Python 2 will no longer be maintained from 2020, and most astronomical packages are already heavily advocating the use of Python 3, it would be useful if this package could also be made compatible.
In a quick test, the "futurize" tool (http://python-future.org/automatic_conversion.html) seems to do a good job with the package, most of the changes being print, xrange->range, and changes where e.g. keys() returns iterators instead of lists. It should also retain Python 2 compatibility
The only unfixed item I've encountered so far is the definition of AISampler in Sampler.py, due to it inheriting from both object and FileHandler. I believe it's no longer necessary to inherit from object in Python 3, and removing this fixes the issue. The code also still appears to work in Python 2, but I've not done a comprehensive test.
The text was updated successfully, but these errors were encountered:
Given that Python 2 will no longer be maintained from 2020, and most astronomical packages are already heavily advocating the use of Python 3, it would be useful if this package could also be made compatible.
In a quick test, the "futurize" tool (http://python-future.org/automatic_conversion.html) seems to do a good job with the package, most of the changes being print, xrange->range, and changes where e.g. keys() returns iterators instead of lists. It should also retain Python 2 compatibility
The only unfixed item I've encountered so far is the definition of AISampler in Sampler.py, due to it inheriting from both object and FileHandler. I believe it's no longer necessary to inherit from object in Python 3, and removing this fixes the issue. The code also still appears to work in Python 2, but I've not done a comprehensive test.
The text was updated successfully, but these errors were encountered: