Quote (0n35 @ Apr 2 2014 04:06am)
In Python 2.x print is a special statement, not a function
This is why it can't be used like: lambda x: print x
Note that (expr) does not create a Tuple (it results in expr), but "," does.
It seems to work like a function, in the way it works in Python 3+
Code
>>> a = range(0,4)
>>> a
[0, 1, 2, 3]
>>> for i in a:
... print(i+i)
...
0
2
4
6
>>>
You are right, I believe in Python the “,” determines if something is a Tuple more so than the “()”
I think there might be something wrong with lambda, the way it was made, but I am probably wrong.
The way Print is working currently in 2 may be a way to help ease the conversion to 3.