Dr. Dobb's Python-URL! - weekly Python news and links (Mar 26)
Cliff Wells
logiplexsoftware at earthlink.net
Thu Mar 28 18:42:10 EST 2002
On Thu, 28 Mar 2002 15:43:20 -0800
David Ascher wrote:
> May I suggest that you instead do:
>
> >>> class MyClass:
> ... def do_this(self):
> ... "this function would do this"
> ... def do_that(self):
> ... "while this function would do that"
> ...
> >>>
>
> and use the docstrings as a placeholder for the actions of the function
> -- typically something that's foremost in your mind when you're
> pseudocoding, and it counts as a statement as far as the parser's
> concerned (hence is syntactically valid), and at the same time, you've
> already got docstrings ready for you when you start to implement.
Phil is trying to avoid having to backspace 4 times to delete a pass
statement. Why the hell would he want to type in an entire docstring???
;)
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308 (800) 735-0555 x308
More information about the Python-list
mailing list