I came in here to Bitch about Python.
I just started using Python3 about 5 minutes ago, and my code shows invalid syntax errors. No help from the debugger, and I am scratching my head. How the hell did I screw up a print statement?
Code:
print "hello" , myVar
print "hello" , "world"
Now I'm ****ing up a "hello world" program?
Python decided to make print a function, so now we have to write:
print(x).
The Docs are very helpful with this situation:
Quote:
Initially, you’ll be finding yourself typing the old print x a lot in interactive mode. Time to retrain your fingers to type print(x) instead!
What else is new in Python3?
http://docs.python.org/release/3.0.1/whatsnew/3.0.html
Lots of stuff, but this one is the only thing I find pointless, but I guess I need to be properly informed.
I know that someone will be very pleased to see these are gone:
Quote:
dict methods dict.keys(), dict.items() and dict.values() return “views” instead of lists. For example, this no longer works: k = d.keys(); k.sort(). Use k = sorted(d) instead (this works in Python 2.5 too and is just as efficient).
Also, the dict.iterkeys(), dict.iteritems() and dict.itervalues() methods are no longer supported.
Just beware that the docs don't cover all the changes.