Message83587
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. |
|
Date |
User |
Action |
Args |
2009-03-14 13:30:14 | jdwhitley | set | recipients:
+ jdwhitley, georg.brandl, rhettinger, k0wax |
2009-03-14 13:30:14 | jdwhitley | set | messageid: <1237037414.68.0.676639559007.issue1714448@psf.upfronthosting.co.za> |
2009-03-14 13:30:12 | jdwhitley | link | issue1714448 messages |
2009-03-14 13:30:11 | jdwhitley | create | |
|