3 ms·
maybe not removed, but they certainly did make breaking changes to the language. here are some of the most obvious python 2: print "foo" # foo 3 / 5
by yammajr 8y ago
maybe not removed, but they certainly did make breaking changes to the language. here are some of the most obvious
python 2:
print "foo" # foo
3 / 5 # 0
apply # <built-in function apply>
python 3:
print "foo" # SyntaxError: Missing parentheses in call to 'print'
3 / 5 # 0.6
apply # NameError: name 'apply' is not defined
- stcredzero 8y agoThese are precisely the kind of changes one would make to a language if you wanted to cause as much pain as possible. (I say this as someone who has been paid to write a syntax-driven code rewriting tool to go from one language version to another.)
- shaklee3 8y agoBut at the same time, f-strings are soooo much better than the old way, or even .format().