PEP308: Yet another syntax proposal
Andrew Koenig
ark at research.att.com
Mon Feb 10 14:37:42 EST 2003
holger> right. in which case learning about and/or (which you have to
holger> anyway) often helps. Because of the "y is false" problem in
holger> "x and y or z" there are some cases where it doesn't fit. Do
holger> we have real code examples for them?
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))
--
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark
More information about the Python-list
mailing list