PEP308: Yet another syntax proposal
Bengt Richter
bokr at oz.net
Tue Feb 11 00:10:52 EST 2003
On Mon, 10 Feb 2003 19:37:42 GMT, Andrew Koenig <ark at research.att.com> wrote:
>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))
>
with my latest, that would be spelled
self.stream.writeln("Ran %d test%s in %.3fs" %
(run, run == 1 -> "" -> "s", timeTaken))
Regards,
Bengt Richter
More information about the Python-list
mailing list