pre-PEP: Suite-Based Keywords
Oren Tirosh
oren at REMOVETHIS1.hishome.net
Sun Apr 17 02:06:10 EDT 2005
Take a look at Nick Coglan's "with" proposal:
http://groups.google.co.uk/groups?selm=mailman.403.1105274631.22381.python-list%40python.org
It addresses many of the same issues (e.g. easy definition of
properties). It is more general, though: while your proposal only
applies to keyword arguments in a function call this one can be used
to name any part of a complex expression and define it in a suite.
I think that a good hybrid solution would be to combine the "with"
block with optional use of the ellipsis to mean "all names defined in
the with block".
See also the thread resulting from Andrey Tatarinov's original
proposal (using the keyword "where"):
http://groups.google.co.uk/groups?selm=3480qqF46jprlU1%40individual.net
Oren
More information about the Python-list
mailing list