A RetroSearch Logo

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

Search Query:

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

Fwd: [Python-Dev] docstring before function declaration

Fwd: [Python-Dev] docstring before function declaration Fwd: [Python-Dev] docstring before function declarationEric Nieuwland eric.nieuwland at xs4all.nl
Mon Mar 21 15:50:14 CET 2005
Nicholas Jacobson wrote:
> IIRC, Guido once mentioned that he regretted not
> setting function docstrings to come before the
> function declaration line, instead of after.
>
> [ examples deleted ]
>
> 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?

Please don't. All class attributes are declared within the class. 
Pulling out the docstring would make it an exception. The current 
situation is very clear and easy to explain to newbies.

If you feel the current position of the docstring may be the first 
attribute's docstring, insert a newline at the proper positions to 
separate the two. It works for me.

--eric

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