Necessity of ``pass''
Justin Sheehy
dworkin at ccs.neu.edu
Tue Aug 24 13:41:00 EDT 1999
forcer <forcer at mindless.com> writes:
> You didn't quote the example where i pointed out the real
> problem with pass:
>
> if foo:
> # bar
> # baz
> qux
>
> E.g. if you're developing code and just commented out a (not yet
> worked out branch) to work on a different part of the program.
> Requireing pass here is unecessary.
For what you describe, pass is already unecessary. You simply left
out one `#'.
Assuming that I have the following snippet:
if foo:
bar
baz
quux
If I want to do what I think you are describing above, I comment out
the entire if expression, not just its body:
# if foo:
# bar
# baz
quux
Is there any reason not to do it this way, or have I somehow missed
the point behind of your example?
I don't understand how `pass' has much to do with this, really.
-Justin
More information about the Python-list
mailing list