getting rid of pass

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sat May 13 13:50:38 CEST 2006


David Murmann a écrit :
> Hi all!
 >
> i just had this crazy idea:
 >
> instead of
> 
> while cond():
>    pass
> 
> write
> 
> while cond().

Yuck

> or
> 
> try:
>    import xyz
> except ImportError:
>    pass
> 
> compared to
> 
> try:
>    import xyz
> except ImportError.

Yuck again

> i don't know whether this is syntactically unambiguous or replaces all
> uses of pass, but i find it quite nice to read.

I don't. I find it highly unreadable. I really find the pass statement 
to be a great idea, and to highly improve readability.

> also if something like this has been proposed before and rejected, i
> apologize for this late-in-the-night idea.
> 
> what do you people think?

Please don't feel offended, but I think it would be a very bad thing to do.



More information about the Python-list mailing list