Earlier quoted context omitted.
Are you expecting the same running interpreter to have both python 2 and 3 modules at the same time, with calls between the modules working? You can easily keep things separate - python 2 executable is named python while python 3 is python3. https://www.python.org/dev/peps/pep-0397/ Sadly concurrent running in the same interpreter won't work because Python 3 has different types for strings (unicode only) and a bytes…
Yes, that is what I expect. The various flavors of C and C++ get along just fine that way. C++ is not a superset of C: http://stackoverflow.com/a/1201840/270610 C and C++ have a similar issue with strings. C code uses NUL-terminated char arrays, while C++ generally uses std::string. If you want to interface the two, you need glue code (written in C++). Surely Python 3 can work the same way: to share strings between a…
Code that will break in Python 4
181–190 of 237 posts
Re: Code that will break in Python 4
#182Re: Code that will break in Python 4
#183Earlier quoted context omitted.
Because the differences were important and central to the language.
Only central to the pedants who wanted to "clean it up", and not central to the user base which, as anybody can see, is now cleaved into two warring factions, a result which is far worse than any of the marginal "improvements" can compensate for.
Re: Code that will break in Python 4
#184Guido has stated to not compare semver in the past.[0] Will there be a 3.10 or go to 4.0 after 3.9, per one of his core developers?[1] It's hard to tell with Python's leadership (no intentional mockery of the term leadership). My guess is that they'll indeed push onwards to Python4 as soon as possible. This being another attempt to make Python2 look as old and crufty as possible. "You're still on Python2? Wow, I'm on…
Amen! Ruby managed the transition to unicode much better as they delivered 2x performance increase at the same time AND labeled the new version 1.9 instead of two. Much the same problem. Yes python 2 is OK but it's legacy mode and people will move on. I think one of the selling points of python vs ruby is that its so often OK to just use system python(2) versus ruby where you really need to use something like rbenv.…
You're right though, unless someone takes on the mantle of CPython2, we're looking at being forced to move to 3 or find something else. I personally think '16/'17 will be the year(s) of Swift. With the Perfect server-side Swift framework[1], and more sure to come, it's very intriguing.
I'm a pretty conservative user myself, and dislike churn and feature bloat so I'm also fairly attracted to Go. I'm not suggesting that's Swift by any means. Go promised no breaking changes for a long time so it's a good choice to write long-lived software in (and who knows what will and won't end up being long-lived so we should always assume the latter).
[0]http://morepypy.blogspot.com/2015/03/pypy-stm-251-released.h...
Re: Code that will break in Python 4
#185Earlier quoted context omitted.
Please elaborate. Which feature of Python 3 would be impossible to implement in Python 2? Note that Python 3 code is not guaranteed to work in Python 4, but you are guaranteed to (relatively) painlessly port it, since all Python 3 features are implemented in Python 4 in some way.
Pick a Python 3 feature and let us know how you would implement it in Python 2.
Feature: print function.
Implementation: from __future__ import print_function
Yes, that magical, backwards-incompatible, print function has been in Python 2 all along!
Feature: unicode strings
Implementation: from __future__ import unicode_literals
Amazing! The magical, backwards-incompatible unicode strings backported to Python 2 with one single line.
I could go on and on.
Re: Code that will break in Python 4
#186To be honest, I am quite surprised that even in Python 4 whitespace is still an integral part of the syntax.
Too many egos at stake, at this point. Whitespace will always be syntactic in Python because nobody with any influence wants to admit it's a mistake.
Re: Code that will break in Python 4
#187Earlier quoted context omitted.
This search turns up some quite a few results, including some OpenJDK code: https://searchcode.com/?q=if%28version%2Cstartswith%28%22win... .
that's irrelevant because Microsoft fakes version information for applications by default[1]. [1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms7...
This is a very real scenario when you consider the application is explorer.exe and the plugin is any software that installs custom context menu actions.
Re: Code that will break in Python 4
#188Earlier quoted context omitted.
Too many egos at stake, at this point. Whitespace will always be syntactic in Python because nobody with any influence wants to admit it's a mistake.
That's not an argument, you could say the exact same thing about braces in other languages. Truth is, it's something that works that really doesn't need to be debated to death like it is.
Re: Code that will break in Python 4
#189Earlier quoted context omitted.
Are you expecting the same running interpreter to have both python 2 and 3 modules at the same time, with calls between the modules working? You can easily keep things separate - python 2 executable is named python while python 3 is python3. https://www.python.org/dev/peps/pep-0397/ Sadly concurrent running in the same interpreter won't work because Python 3 has different types for strings (unicode only) and a bytes…
Yes, that is what I expect. The various flavors of C and C++ get along just fine that way. C++ is not a superset of C: http://stackoverflow.com/a/1201840/270610 C and C++ have a similar issue with strings. C code uses NUL-terminated char arrays, while C++ generally uses std::string. If you want to interface the two, you need glue code (written in C++). Surely Python 3 can work the same way: to share strings between a…
I don't know that it would be impossible to make that all work, but I wouldn't assume that it is.
Re: Code that will break in Python 4
#190How come the title was changed?