[Python-Dev] Re: accumulator display syntax
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Oct 22 01:16:33 EDT 2003
David Eppstein <eppstein at ics.uci.edu>:
> Who cares about tuple comprehensions, but I would like similar syntactic
> sugar for dict comprehensions as for lists:
> {k:v for k,v in S}
If you have *that*, as well as generator expressions,
someone is going to want
k:v for k,v in S
as a bare expression to be some sort of generator.
What exactly it would generate isn't clear...
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg at cosc.canterbury.ac.nz +--------------------------------------+
More information about the Python-Dev
mailing list