An invalid expression as parameter
Li Hui
lih at garena.com
Mon Jun 28 08:47:26 EDT 2010
When write
>>>i for i in range(16)
I get "SyntaxError: invalid syntax"
but When I use it like this:
>>>def f(x):\
... pass
>>>f(i for i in range(16))
all is right
I think it maybe f((i for i in range(16)))
--
Li Hui
http://www.lihui.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100628/d9f03682/attachment.html>
More information about the Python-list
mailing list