optional pass? (was Re: Dr. Dobb's Python-URL! - weekly Python news and links (Mar 26))
Tim Peters
tim.one at comcast.net
Fri Mar 29 15:04:13 EST 2002
[Alexandre Fayolle]
> Why don't you put a docstring ? It will help you document precisely what
> you had in mind when writing the class, and you can keep it when you
> actually write the code.
[phil hunt]
> 3 reasons.
Note that this is also a docstring:
''
It's two fewer characters than "pass", and right next to the colon key for
ease of rapid typing <wink>.
> ...
> class Foo:
> def method1(self):
> def method2(self):
> def method3(self):
> def method4(self):
> def method5(self):
You realize there's no chance Guido will go for this, right? It looks like
5 errors of omission.
More information about the Python-list
mailing list