For review: PEP 308 - If-then-else expression
James J. Besemer
jb at cascade-sys.com
Mon Feb 10 14:06:43 EST 2003
>> James J. Besemer wrote:
>>
>> Some data:
>>
>> A quick perusal of Python interpreter source code reveals several
>> hundred uses of the ?: operator.
>>
>> If it's good enough for Python, the implementation -- then it's good
>> enough for Python, the language.
> Christian Tismer wrote:
>
> Great idea!
> Could you do the same statistics over the usage of switch
> statements, semicolons, {} braces, and of course MACROS ?
>
> With the same reasoning you can introduce every construct
> to Python. :-)
Fallacious reasoning.
Cond. expression is optional in C, as it would be in Python. Most of the
other constructs you mention are necessary in C, and thus there's no comparison.
Some have argued that the conditional expression construct is intrinsically
hard to understand. If this were true, one would expect that the right
honorable BDFL would avoid using it in his own code.
My point is that since BDFL clearly sees fit to use it ROUTINELY in his own C
code, then it must not materially impair readability nor be all that hard to
understand.
Furthermroe, if you took the time to read His cited code, all are examples of
things that one might reasonably want to do in a Python program.
> C has as much to do with Python as the machine code which
> gcc emits for the C code.
>
> Python's-dead--long-live-C - ly y'rs - chris
Your response shows an IRRATIONAL prejudice against C, which I believe drives
the bulk of the anti-PEP308 sentiment.
--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