Jervis Whitley <[email protected]> added the comment:
Hi,
I like this idea.
I've put together a short patch that will implement inline
assignment.
if f() -> name:
use(name)
or more powerfully:
if f() -> name == 'spam':
usespam(name)
the old syntax if something as x: is still available if that
is what is desired.
if (f() == 'spam') -> name:
newname = name.replace('p', 'h')
Patched against Py3k please kick the tires, I've added some tests and
developed a PEP.
----------
keywords: +patch
nosy: +jdwhitley
versions: +Python 3.1 -Python 2.6
Added file: http://bugs.python.org/file13329/assexp.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue1714448>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com