[Python-bugs-list] [ python-Feature Requests-517920 ] = (assignment) as expression
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 15 Feb 2002 02:42:01 -0800
Feature Requests item #517920, was opened at 2002-02-15 02:41
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=355470&aid=517920&group_id=5470
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Frank Sonnenburg (sonnenburg)
Assigned to: Nobody/Anonymous (nobody)
Summary: = (assignment) as expression
Initial Comment:
Hi Python-Developers
I am new to python and maybe this was considered
before. I think it would be VERY helpful, if one
could use assignments as expressions as it is in C,
e.g. in while-loops:
import mailbox
file = open('mailfile')
mbox = mailbox.PortableUnixMailbox(file)
# the following line produces
# SyntaxError: invalid syntax
while mail = mbox.next():
# do something with this mail
...
Best regards
Frank Sonnenburg
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=355470&aid=517920&group_id=5470