PEP-308 a "simplicity-first" alternative

Tim Peters tim.one at comcast.net
Mon Feb 17 16:55:48 EST 2003


[Tim, on examples of broken and/or in the std library]
> I've seen exactly one, found by Andrew Koenig, where the difference
> was between printing "1 test" (intended) and "1 tests" (actual) -- it
> was truly of no consequence.

[Erik Max Francis]
> He posted at least one additional example, I believe.

He posted several examples, but only the one mentioned was actually
incorrect.  Two weren't obviously correct in isolation, but neither is

    i += 1

obviously correct in isolation (e.g., in isolation you can't know that i
isn't sys.maxint going into this line; similarly, in isolation you can't
know whether a may be true and b false in "a and b or c"; but in context the
impossibility of such things can be obvious -- and in these other examples
was obvious).






More information about the Python-list mailing list