[Python-ideas] from __past__ import division, str, etc
Andrew Barnert
abarnert at yahoo.com
Thu Jan 9 19:00:47 CET 2014
On Jan 9, 2014, at 8:50, Nick Coghlan <ncoghlan at gmail.com> wrote:
> But if a project has persistent problems with application developers persistently introducing bugs by using 8-bit strings where they should be using Unicode, or otherwise running into the assorted bug magnets we removed in Python 3, the migration may be worth considering.
One thing to note:
For many applications, it's not that hard to migrate to the six-able subset of 2.7/3.3. This allows 2.x-centric contributors (including those who want to be able to just use the python that Apple or Ubuntu pre-installed on their dev box), allows you to continue using py2exe for your Windows binaries, and gives you an out if you run into the "but what it we later need some library that hasn't been ported yet" problem (which I think is drastically overblown, but it's certainly a common enough fear).
And meanwhile, from my experience, it's at least as hard to introduce subtle Unicode bugs in a dual-version code base as a 3.x-only code base, and just as easy to debug them, so you get at least one advantage over 2.x-only.
And being able to migrate gradually instead of having a flag-day release is always nice.
In my day job, I work on a project that's written in multiple languages, and the python parts are all 2.7+/3.3+. While I miss being able to use some 3.3 features, and it's annoying to deal with problems like 2.7 using too much memory when processing giant XML files or the old version of sqlite in 2.7.2 panicking over a simple union and ignoring an index, it's still far better than having to debug mojibake in 2.7, or writing in node.js or ObjC.
More information about the Python-ideas
mailing list