- class stuff(object) vs class stuff;
- range vs xrange;
- itertools.izip vs zip;
- itertools.imap vs map;
- itertools.ifilter vs filter;
- dict.items vs dict.iteritems vs dict.viewitems;
- dict.items vs dict.itervalues vs dict.viewvalues;
- dict.items vs dict.iterkeys vs dict.viewkeys;
- __cmp__ vs __eq__ + __gt__;
- sorted(cmp) vs sorted(key);
They didn't fallout from the philosophy. They have been pragmatic and tried to balance the language design : gaining modern features vs making a robust base vs pleasing the legacy crowd. Is. Is. Very. Hard.And yes, we would all prefer to have less way to format. Would it mean I would prefer NOT to have fstring ? Certainly not, it's a great feature. We can't live in the past because it will make us not stand perfectly to the ideal we have.
Real life is not ideal.
But merging Python 2 and 3 ?
With the string model completly reworked, that would be apocaliptic. Most people don't realize how deep the unicode change has been.
I have been dev and teaching Python 2 and 3 for years. The amount of problems linked to UnicodeDecodeError dropped by 90% after the switch.
Not because Python 2 model didn't work.
Because nobody understand text.
Most dev don't understand what text is. They just want to format string. That's what Python 3 helps to do, and it does it well.
Mixing both would be like mixing olive oil and vanilla ice. Great on their own way, but use them together all you'll get a terrible meal.
Do you seriously think anybody is thinking of dropping python 2 support by 2020 ? that will only create a fork. None of the core frameworks have upgraded in a decade. Look at Flask for example. So yes, I havent been using Python 3 much - there has been no reason to.
the point I'm trying to make is how to get everyone on the same page. The reason Python 3 was api incompatible was because of the core tenet of one-true-way. All the functions you mentioned may be superior, but unless you give people a way to mix and match both in the same source , you will not have adoption.
Or do you think Python 3 adoption has been successful ?
If Python 3.6 is going to introduce multiple ways to do the same thing, there is no good reason to not merge Python 2 and 3 together and have both set of behavior co-exist with each other (__future__ or __past__).
In one shot, you break the Berlin wall of Python.