[Python-Dev] [UPDATE] PEP 274, Dict Comprehensions (original) (raw)
Greg Ewing greg@cosc.canterbury.ac.nz
Tue, 30 Oct 2001 15:25:09 +1300 (NZDT)
- Previous message: [Python-Dev] Dict API refinements (was PEP 274)
- Next message: [Python-Dev] [UPDATE] PEP 274, Dict Comprehensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
+1 generally on dict comprehensions, but:
>>> print {1 for x in listofemailaddrs} {'barry@zope.com' : 1, 'barry@python.org' : 1, 'guido@python.org' : 1}
-1 on this bit. It's not at all clear what it should mean, and the saving over writing it out explicitly, i.e.
{x:1 for x in list_of_email_addrs}
is vanishingly small.
Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
- Previous message: [Python-Dev] Dict API refinements (was PEP 274)
- Next message: [Python-Dev] [UPDATE] PEP 274, Dict Comprehensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]