PEP 276 Simple Iterator for ints
James_Althoff at i2.com
James_Althoff at i2.com
Wed Nov 14 17:23:02 EST 2001
William Tanksley wrote:
>An important point. "for i in 10,:" is an enormously different thing
>under this proposal that "for i in 10:"
Agreed, it is different.
I would suggest that it is different in the same way that the following
valid Python statements are different:
for string in 'hello': print string
for string in 'hello',: print string
One needs to understand that "spam," is not the same as "spam" in the
context of a for-loop regardless of whether or not types.IntType has an
iterator.
Jim
More information about the Python-list
mailing list