[Python-Dev] Support for PyGetSetDefs in pydoc
Nick Coghlan
ncoghlan at gmail.com
Thu Jul 13 15:15:46 CEST 2006
Barry Warsaw wrote:
> For example, I could change inspect locally so that it gets the type
> of datetime.timedelta.days without adding a constant to types.py. Or
> I could patch pydoc.py directly and leave even inspect.py out of it.
> Or I could create some stupid internal type in some stupid internal
> module who's only purpose would be to have a handle on member
> descriptors. Or I could change datetime to be built-in. (see what I
> mean about levels of ickyness? :).
>
> I'm up for suggestions. I think this would be worthwhile to address
> in Python 2.5 since I think it would be good to have an accurate
> representation of Python's built-in types in types.py. Ultimately, I
> really care about teaching pydoc.help() about instances of these
> types so that users can get better help when they encounter them
> (such as might be the case in 3rd party extension modules).
>
> Suggestions are welcome.
Could you include a "look up late-breaking types" function in types.py that
site.py calls after it finishes setting up the standard library path?
Still a little hackish, I know, but it seems less icky than your suggestions
above, as it means that fixing anything similar that comes up in the future
will only require modification of types.py.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-Dev
mailing list