mattjj / pybasicbayes

MIT License
153 stars 60 forks source link

Finish Python 2 and 3 compat: metaclasses, builtins #24

Closed ariddell closed 9 years ago

ariddell commented 9 years ago

Ran futurize stage2, see http://python-future.org/futurize_cheatsheet.html.

python-future appears to be the current choice (e.g., over six) for helping to maintain a codebase that's Python 2 and Python 3 compatible. eight is another option but it appears targeted at people starting from a Python 3 codebase.

Note that you do need to use the Python 3 syntax for range, filter, and zip (e.g., range now calls xrange under Python 2.)

ariddell commented 9 years ago

There are a couple of tests that fail but I think they were failing before this (mostly import errors (ipdb and plt from matplotlib).

mattjj commented 9 years ago

Awesome, thanks.

If you've got them handy, can you paste me those errors?

ariddell commented 9 years ago

Sure. I just put them in #26.