Code that will break in Python 4
51–60 of 237 posts
Re: Code that will break in Python 4
#52Maybe Python 4 will be properly compatible with Python 2?? Kidding. But more seriously, probably good advice. Isn't "explicit" one of the Pythonic mantras? But I'm wondering if any code written today really will survive until "Python 4"?
Re: Code that will break in Python 4
#53I don't get it. When Py4 comes in sight they'll fix it probably so `six.PY3` is only True when using a Python3 interpreter and I guess they'll introduce a viariable `six.PY4`.
Re: Code that will break in Python 4
#54Re: Code that will break in Python 4
#55Re: Code that will break in Python 4
#56Re: Code that will break in Python 4
#57Re: Code that will break in Python 4
#58Re: Code that will break in Python 4
#59No problem! I've already fixed it so that all my code is forward compatible with Python 7000, despite not knowing what any of the syntax or library changes are going to look like.
There is a difference between writing code that might break and code that is guaranteed to break. Badly written version checks are guaranteed to break.
Microsoft thought there were too many broken version checks in the wild, so decided to hobble the version check function as a fix. I can understand why they did it.
Re: Code that will break in Python 4
#60Holy shit - people actually write code like this?