PEP 289: Generator Expressions (please comment)

Daniel Dittmar daniel.dittmar at sap.com
Mon Oct 27 10:59:27 EST 2003


Alex Martelli wrote:
>> counter proposal:
>> g[(p.score, p.name) for p in players ]
>
> Looks like it's indexing g.
>
>> This works similar to r'\' for raw strings and u'x' for unicode
>> strings.
>
> Nope, it's ambiguous, while <single letter> adjacent to '...' isn't.

Although I admit my proposal is flawed, the principle behind is is sound,
namely that syntax constructs should be recognisable at the start.

>> p[$*-=%/sd/!] allows to embed perl code
>
> If you want perl, you know where to find it.

See how difficult it is even for you to recognize something if it isn't
introduced by the proper markers, in this case <sarkasm>?

Daniel









More information about the Python-list mailing list