pre-PEP for optional 'pass'
Terry Reedy
tejarex at yahoo.com
Wed Apr 17 11:29:50 EDT 2002
>(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.
If one *does* use 'pass' instead of a docstring as a placeholder, it
is *not* necessary to remove it (except for aesthetics).
def f():
return 1
pass
is perfectly legal, as is
def f():
pass
return 1
Terry J. Reedy
More information about the Python-list
mailing list