Re: [Epydoc-devel] epydoc 2.1 can't handle PyGetSetDefs?
Brought to you by:
edloper
From: Daniele V. <dan...@gm...> - 2006-07-13 06:38:49
|
On 7/13/06, Edward Loper <ed...@gr...> wrote: > On Jul 10, 2006, at 3:12 PM, Barry Warsaw wrote: > > It appears that epydoc cannot handle class attributes > > defined in extension modules with PyGetSetDef. We define almost all > > of our attributes this way and all I get are things like > > > > getset_descriptor | alias_limit = <attribute 'alias_limit' of '...' > > > > This even though alias_limit's PyGetSetDef structure contains a > > docstring and in fact you can get the __doc__ of that descriptor just > > fine. > > Thanks to Daniele for providing a quick patch to address this. One > question that came up in that patch, though, is what the best way is > to get at the getset_descriptor type. I suggested the following > (which I found via google): > > >>> print type(types.FunctionType.__dict__.get('__dict__')) > <type 'getset_descriptor'> > > But this seems to be an implementation detail of FunctionType, that's > subject to change in the future. It doesn't look like the > getset_descriptor type is accessible via the types module. So any > suggestions on what the best way to get at this type is? What about creating an extension module of our own (probably it should be called "epyzoo.so" :D) with a specimen (two in case of Flood) of the different extension types availablein from the C API? It could be used as an addendum to the types module. That woud have the drawback of requiring a binary distribution on Windows platforms but i'm about used at that (even if i'm not a w32 user anymore - i moved to Gentoo a few months ago - however i have some winbox handy to build them) Daniele |