pre-PEP for optional 'pass'
Fernando PĂ©rez
fperez528 at yahoo.com
Wed Apr 17 01:20:00 EDT 2002
phil hunt wrote:
>>I think the idea behind pass is that usually not having anything in
>>a conditional is a mistake, so we want to be informed about it. Putting
>>pass is like saying "I'm sure that's what I want."
>
> I'm sure what I want, without needing to explicitly say it.
>
And that would put python in the land of the dreaded C construct:
if(this)
do_that();
and_that();
Was the second function meant to be in the if and the developer forgot braces?
Or is it meant to be truly outside and it's misindented?
You may have known what you wanted without being explicit when you wrote the
code, but what about the poor sob who has to deal with it two years later
when you're not around? That's why explicitness is good, particularly when
implictness opens the way to ambiguity.
Cheers,
f.
More information about the Python-list
mailing list