pre-PEP for optional 'pass'

Erik Max Francis max at alcyone.com
Mon Apr 15 20:56:42 EDT 2002


phil hunt wrote:

> OK, I've decided to write a PEP. Preliminary to this, I'd like
> people's comments.
> 
> I wish to make the pas startement optional. That is, in any Python
> program where there is a pass it can be left out and the meaning of
> the program is unchanged.

The purpose of pass to explicitly disclaim what you're intending to do;
it reduces programmer error.  In cases in code where you see something
like:

	if condition:
	doSomething

It is far more likely that this is an indentation mistake rather than a
deliberate null statement.  The pass keyword removes all doubt:

	if condition:
	    pass
	doSomething

The pass keyword helps solidify this kind of behavior.  Convenience and
beauty can't really hold a candle to utility (even if it is marginal
utility) and precendent.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Nationalism is an infantile sickness.
\__/ Albert Einstein
    Alcyone Systems' Daily Planet / http://www.alcyone.com/planet.html
 A new, virtual planet, every day.



More information about the Python-list mailing list