Open shuttle1987 opened 5 years ago
@aapeliv Should I just crank the handle and make this post before the end of the year?
A starting line might be something like: "A very obvious annoyance with Python 2 code bases is that official support is just about to end, but what about all the other smaller forgotten annoyances that existed in previous versions?"
More annoyances included:
True
and False
in old versions. (True and False are still unfortunately subclasses of int even to this day, which I still think is a huge design mistake.)
Recently I've been updating some software that was powering a static site generator. All this was in Python 2. Over the years I've also run into people somewhat skeptical of the benefits of moving to Python 3, even as late as 2016 I was working somewhere that was making new greenfield projects in Python 2!
So there's the major things that Python 3 solves, one of the largest wins in the unicode support. However there's a lot more to it than that.
Here's some annoyances that have been mostly forgotten:
"Abc" < None
won't raise an error.from library import *
in a function in Python 2True
andFalse
with other valuesint
/long
data types weren't unified.f(*args, **kwargs)
then processkwargs
manuallyThere's probably more too, but there's some good examples of little annoyances that have mostly been resolved. The standard library has a whole bunch more of these no doubt.