PEP-0318

Roy Smith roy at panix.com
Sun Aug 8 21:39:05 EDT 2004


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.



More information about the Python-list mailing list