python 3's adoption

Lie Ryan lie.1296 at gmail.com
Thu Jan 28 17:35:36 CET 2010


On 01/28/10 19:37, Paul Rubin wrote:
> Jonathan Gardner <jgardner at jonathangardner.net> writes:
>> If you're going to have statements, you're going to need the null
>> statement. That's "pass".
> 
> Why?  Expressions are statements, so you could just say "pass" (in
> quotes, denoting a string literal), or 0, or None, os anything else like
> that, instead of having a special statement.

or, if the null statement "pass" is removed, you could define:
pass = None
or
pass = object() # sentinel

and have essentially the same thing.

hmm... on second thought, not special-casing pass means doing a
LOAD_GLOBAL or LOAD_CONST for operation that is supposed to be doing
nothing.



More information about the Python-list mailing list