PEP-0318
Anthony Baxter
anthonybaxter at gmail.com
Sun Aug 8 21:46:54 EDT 2004
On Sun, 08 Aug 2004 21:39:05 -0400, Roy Smith <roy at panix.com> wrote:
> In article <mailman.1369.1092015284.5135.python-list at python.org>,
> Anthony Baxter <anthonybaxter at gmail.com> wrote:
>
> > def doc(docstring):
> > def add_doc_string(func, docstring=docstring):
> > func.__doc__ = docstring
> > return func
> > return add_doc_string
>
> I don't understand the "docstring=docstring" in the argument list for
> add_doc_string. I suspect there's something subtle going on with scope
> rules, but I don't see it.
Oops, habit, from before Python had nested scopes. You don't need it
these days.
More information about the Python-list
mailing list