PEP308: Yet another syntax proposal
James J. Besemer
jb at cascade-sys.com
Mon Feb 10 18:15:28 EST 2003
Andrew Dalke wrote:
> Raymond Hettinger
>
>>># Example where all three reasons apply
>>>data = isinstance(source, str) ?? source.readlines() ||
>>
>>source.split()
>>
>>That should have been:
>> isinstance(source, file)
> Err, that should have been
>
> [ spelled out long-hand ]
Now you're being unreasonable.
You were asked for an example where short-circuit would be necessary and this
is a well-intentioned, legitamet illustration.
The fact (as you point out and WE ALL KNOW) that it can be rewritten the
other way does not materially add to the discussion.
--jb
--
James J. Besemer 503-280-0838 voice
2727 NE Skidmore St. 503-280-0375 fax
Portland, Oregon 97211-6557 mailto:jb at cascade-sys.com
http://cascade-sys.com
More information about the Python-list
mailing list