A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-March/052323.html below:

[Python-Dev] docstring before function declaration

[Python-Dev] docstring before function declaration [Python-Dev] docstring before function declarationNicholas Jacobson nicksjacobson at yahoo.com
Mon Mar 21 08:10:43 CET 2005
IIRC, Guido once mentioned that he regretted not
setting function docstrings to come before the
function declaration line, instead of after.

i.e.

"""This describes class Bar."""
class Bar:
...

Or with a decorator:

"""This describes class Bar."""
@classmethod
class Bar:
    ...

Versus the current method:

class Bar:
    """This describes class Bar."""
    def foo:
    ...

where the docstring looks like it refers to foo, not
Bar.

I think that commenting the function before its
declaration, at the same tabbed point, increases the
code's readability.

What do you think about making this change at some
point (e.g. Python 3000)?  Or if not, then having the
option to toggle to this layout?

Thanks,

--Nick Jacobson



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4