PEP 308: some candidate uses cases from live code

Andrew Koenig ark at research.att.com
Mon Feb 10 13:04:45 EST 2003


Here's an example from the Python 2.2.2 distribution, Lib/unittest.py,
lines 618-619:

        self.stream.writeln("Ran %d test%s in %.3fs" %
                            (run, run == 1 and "" or "s", timeTaken))

Need I say more?

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark




More information about the Python-list mailing list