5 ms·
Porting 2 -> 3 isn't that terrible. Writing code that is compatible with both 2 and 3 is difficult, and this is what the OP was talking about. There are things
by burntsushi 12y ago
Porting 2 -> 3 isn't that terrible.
Writing code that is compatible with both 2 and 3 is difficult, and this is what the OP was talking about. There are things you can do to make it easier (like using the `six` library or ignoring Python 3.{0,1,2}), but the burden of writing that subset of language that works on both still lies with the programmer.
I've done it and it's not fun. It's also been a source of bugs.
The other snafu here is your dependencies. If you depend on a large project that isn't Python 2/3 compatible, then you're basically shit-out-of-luck.