[Python-ideas] Smoothing transition to Python 3
tritium-list at sdamon.com
tritium-list at sdamon.com
Sat Jun 4 06:33:56 EDT 2016
More information about the Python-ideas mailing list
Sat Jun 4 06:33:56 EDT 2016
- Previous message (by thread): [Python-ideas] Smoothing transition to Python 3
- Next message (by thread): [Python-ideas] Smoothing transition to Python 3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> -----Original Message----- > From: Python-ideas [mailto:python-ideas-bounces+tritium- > list=sdamon.com at python.org] On Behalf Of Neil Schemenauer > Sent: Friday, June 3, 2016 9:18 AM > To: python-ideas at python.org > Subject: [Python-ideas] Smoothing transition to Python 3 > ... > - comparision with None, smaller than all other types In a hypothetical python 2.8, the python 3 behavior would be in my backport list... > - comparision of distinct types: use Python 2 behavior (i.e. order > by type name) ...and this > - mixing of unicode strings with byte strings: decode/encode > using latin-1 ...and this > - dict objects: make keys() items() values() return special sequence > that warns if iterated over multiple times or indexed as sequence ...and this. In fact most of the things you list here are the GOOD ideas that python 3 enforces that reduces bugs when avoided in python 2. What would actually help the transition, in my world-view at least is * A bytes type like the string type in python 2 (*without implicit conversion!*) There are too many real world use cases that the bytes type makes painful, including anything dealing with networking. * an alias to the string type named 'unicode' (this just makes polyglot a whole heck of a lot less stressful... yes I do this myself, it's annoying, if it was there by default, like bytes is in 2.7, it would make life a lot easier. One just never just never references `str`) * a "magic" mapping from old to new module names. In my experience, this is actually a bigger pain than it looks. I had discussed, informally on IRC, the concept of building a hypothetical 'final version of python 2' that is, in fact, libpython3 with a python2 parser and shims in front of it. The general response was the theme of the entire python 3 transition story: "I don't see the value added." This was in response to more than just my crazy idea, but to the entire process and existence of python 3. I cannot disagree; the entire situation is a lot of effort for very little value added. Maybe a 'more compatible python 3' is a solution, maybe not. I have seen the pypi download numbers[1], and it is not encouraging for python 3; python 2 outstrips python 3 by a factor of 10 in terms of package downloads on linux, and a factor of 6 on mac. The only platform where python 3 has a real story against 2 is windows. If python 3 really is to be the future, a lot more needs to be done to bring the vast majority of users on board. Telling them "Just port your code" is not good enough. [1] https://s.caremad.io/WPVkP3Ruhg/ (query: https://bpaste.net/show/56443668b83f)
- Previous message (by thread): [Python-ideas] Smoothing transition to Python 3
- Next message (by thread): [Python-ideas] Smoothing transition to Python 3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list