PEP 308: some candidate uses cases from live code

Andrew Dalke adalke at
Mon Feb 10 21:44:37 CET 2003

Andrew Koenig:
> Here's an example from the Python 2.2.2 distribution, Lib/,
> lines 618-619:
>"Ran %d test%s in %.3fs" %
>                             (run, run == 1 and "" or "s", timeTaken))
> Need I say more?

Care to make any comments about the use of the non-standard
and Pascal-like "writeln" instead of using the much more standard
"write" with a "\n" at the end of the string?

Are other parts of the code written as if by someone with
more experience in some language other than Python?  Could that
experience have cause them to want a "?: by any means" rather
than using a more traditional approach?

                    dalke at

More information about the Python-list mailing list