On Dec 9, 2010, at 8:57 AM, Chris McDonough wrote:

> Anyone up for a reasonably easy if boring contribution task (for webob)?
> 
> If you look closely at
> http://docs.pylonshq.com/pyramid/dev/api/httpexceptions.html you'll
> notice that none of the docstrings in any of the exception classes
> documented (e.g. HTTPFound) shows the status code or describes the
> arguments to the class' constructor.
> 
> To fix this, someone needs to change WebOb (we reuse the webob
> docstrings in Pyramid).  Every one of those exceptions needs a docstring
> describing at least the status code, and optimally describe the
> arguments to the class' constructors.

We should also be able to programmatically create the docstrings. The classes 
already have a title and sometimes a description field describing the HTTP 
status code, those could be combined to create the docstring.

It would as easy just looping through the classes (which are already collected 
in a module level dict) and assigning a __doc__ attribute -- however Python 
2.6? made __doc__ on classes read-only. So I think the only option we have to 
do this programmatically is via a metaclass.

> 
> The code is at http://bitbucket.org/ianb/webob/overview
> (specifically
> http://bitbucket.org/ianb/webob/src/ac0ab0e481bf/webob/exc.py ), so you
> should be able to fork and submit a pull request to Ian.

--
Philip Jenvey

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-de...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to