3 ms·
Re: "One of the great strengths of Python 2 is the long tail of 3rd party libraries to do, well, just about anything. Python 3 doesn’t have this." Sure, this is
by dj-wonk 12y ago
Re: "One of the great strengths of Python 2 is the long tail of 3rd party libraries to do, well, just about anything. Python 3 doesn’t have this." Sure, this isn't ideal, but this is open source... if you use a library, step up and port it over. How hard is it?
- neals 12y agoYes, honest question. I've never written a line of python. How hard is it to port 2 -> 3?
- dj-wonk 12y agoI haven't done it but see https://docs.python.org/dev/howto/pyporting.html https://docs.python.org/dev/howto/pyporting.html
- PythonicAlpha 12y agoPy2 -> Py3 is not that hard (when you don't step into troubles with system functions and Unicode) but porting libraries can be very hard, because some of them are rather complex and many include C coding -- and porting that stuff is much harder.
- andreasvc 12y agoIt's not so much that it's hard, but it's a lot of work, without tangible benefits. On top of that, it's desirable to have a code base that is compatible with both 2 and 3, which requires awkward workarounds.
- pekk 12y agoUsually not hard at all, but even an easy transformation becomes hard when it is applied to a really huge codebase
- burntsushi 12y agoPorting 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.
- astrodust 12y agoI "ported" many libraries from Ruby 1.8 to 1.9 when the introduction of string encoding caused a whole host of problems. This was anything but fun. Python 3 introduces far, far more changes than that. It sounds like a world of hurt to port things. Some people would rather port their entire app to another platform that respects the programmer's historical investment.