pre-PEP for optional 'pass'

phil hunt philh at comuno.freeserve.co.uk
Tue Apr 16 18:28:44 EDT 2002


On Tue, 16 Apr 2002 10:17:30 -0700, Russell E. Owen <owen at nospam.invalid> wrote:
>In article <slrnabmoci.dhk.philh at comuno.freeserve.co.uk>,
> philh at comuno.freeserve.co.uk (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...
>
>I'd go along with it and offer a third rationale:
>
>The need for pass is a pain when commenting out entire blocks of code 
>(e.g. while debugging). Instead of just commenting out the code, one 
>must also add a "pass" statement, and then try to remember to take it 
>out again when re-enabling the code.

That's true, and one that has happened to me.

>In my opinion an optional pass is a very good thing -- sometimes you 
>want to be able to assert "this block intentionally left blank", but 
>sometimes it makes more sense to just accept a truly empty block.
>
>Thanks for proposing this. I'm sure you'll get lots of horrified 
>reactions

I don't see why: people who like pass can still use it.


-- 
<"><"><"> Philip Hunt <philh at comuno.freeserve.co.uk> <"><"><">
"I would guess that he really believes whatever is politically 
advantageous for him to believe." 
                        -- Alison Brooks, referring to Michael
                              Portillo, on soc.history.what-if



More information about the Python-list mailing list