3 ms·
It has always seemed to me that Python 3 was mainly a fix on the philosophy of handling strings, but that it didn't offered a clear practical advantage for prog
by Acalyptol 10y ago
It has always seemed to me that Python 3 was mainly a fix on the philosophy of handling strings, but that it didn't offered a clear practical advantage for programmers already handling strings with care. I don't think there is a practical reason to upgrade to Python 3 in terms of language design. The reason will be in term of survival as the community seems to be willing to follow the Python 3 movement and official support for Python 2 ends in 2020.
- nodamage 10y agoYes, that is my impression as well. In hindsight, it is unfortunate how much it ended up fracturing the Python ecosystem.
- BozeWolf 10y agoThere are a lot of reasons to upgrade! There is so much more useful stuff in python 3! Even if you think you would not use those features, other libraries you may use might benefit a lot from it. A few features: async/await, lists (and others) use iterators, no var leaking in list comprehensions, super().my_method() instead of super(MyClass, self).my_method(), class MyClass: instead of class MyClass(object):, improved exception handling, required arguments, ", ".join(["etc"]* 1000) Besides that: a much improved standard library, although that technically not is language design.
- aidos 10y agoOf which the improved exception handling is my favourite. You could do ", ".join(["etc"]* 1000) in python2 - what am I missing?
- ReticentMonkey 10y agoCan we expect the async/await introduced from Python 3 for async request handling or maybe some heavy operations ? Something like sanic: https://github.com/channelcat/sanic https://github.com/channelcat/sanic