3 ms·
> How close can you come to a Python code base that runs in v2 and v3? Using the `six` module, this is (nearly) trivial for 99% of code. If you're doing certai
by joshuamorton 7y ago
> How close can you come to a Python code base that runs in v2 and v3?
Using the `six` module, this is (nearly) trivial for 99% of code. If you're doing certain weird things, its more difficult but possible. (I say this having done py2-3 conversion or dual support for lots of vanilla code, as well as a significant amount of weird code: c/c++ extensions and code that uses advanced features like code object introspection and dynamic imports/rewriting/etc).
- tingletech 7y agoI have some libraries I maintain with `six` -- I find it like writing in a whole new dialect (neither 2 nor 3). I moved to futurize for some libraries -- its like writing python 3 that will run on python 2. I am looking forward to dropping python 2 support on libraries I maintain.