PEP308: Yet another syntax proposal
James J. Besemer
jb at cascade-sys.com
Mon Feb 10 18:21:34 EST 2003
Andrew Dalke wrote:
> Andrew Koenig:
>
>>Yes -- as I've noted elsewhere in this discussion, Lib/unittest.py
>>actually contains a (minor) bug because it uses and/or where it
>>doesn't fit. The code is on lines 618-619:
>>
>> self.stream.writeln("Ran %d test%s in %.3fs" %
>> (run, run == 1 and "" or "s", timeTaken))
>
>
> And I've noted elsewhere (so no need to followup on this thread)
> that from that snippet it appear that the person who wrote this
> has more exprience in using other languages (hence the strange
> use of 'writeln') than Python, so that this is perhaps not the best
> indicator of an apropriate Python solution.
Doh.
You silly.
The POINT is that the example contains yet another glaring BUG.
In trusted Python library code.
--jb
> On the other hand, it suggests that an if/else expression would
> make for fewer mistakes caused by people with experience in
> if/else from other languages.
Yes, a forceful case.
--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