[Python-ideas] a in x or in y
אלעזר
elazarg at gmail.com
Thu Feb 13 17:11:17 CET 2014
2014-02-13 17:04 GMT+02:00 Serhiy Storchaka <storchaka at gmail.com>:
>
> 13.02.14 12:57, Steven D'Aprano написав(ла):
>
>> I like it. In natural language, people often say things like:
>>
>> my keys are in the car or in my pocket
>>
>> which fools them into writing:
>>
>> keys in car or pocket
>>
>> which does the wrong thing. Chained "in" comparisons is a natural
>> extension to Python's already natural language-like syntax. Python
>> already has other chained comparisons. Being able to write:
>>
>> keys in car or in pocket
>>
>> feels natural and right to me. (We can't *quite* match the human idiom
>> where the second "in" is left out, but one can't have everything.)
>
>
> You forgot keyword "are".
>
> keys are in car or in pocket
>
>
And what about
keys are in car or in pocket and not in purse
it will be too complicated.
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140213/bf2f5ea4/attachment.html>
More information about the Python-ideas
mailing list