[Python-ideas] Assignments in list/generator expressions

Nick Coghlan ncoghlan at gmail.com
Tue Apr 12 01:46:37 CEST 2011


On Tue, Apr 12, 2011 at 9:24 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Eugene Toder wrote:
>>
>> The problem with 'where'
>> is that it's already used as identifier by various SQL frameworks,
>> which is why PEP 3150 uses 'given' instead.
>
> That's not necessarily a deal-breaker -- it could be made
> context-sensitive, like was done with 'as' for a few versions
> before it became a true keyword.

Eugene slightly mischaracterised the objection I have to the choice of
"where" as the keyword in the context of PEP 3150. It isn't that it
breaks existing libraries, it breaks database programmers' *brains*,
because "where" is the SQL keyword for filtering.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list