Re: [Epydoc-devel] Re: epydoc questions
Brought to you by:
edloper
From: Robin D. <ro...@al...> - 2004-04-24 00:29:13
|
Edward Loper wrote: > >> And if I decide that I am insane enough <wink!> to try and implement >> the above feature on the current system do you have any suggestions >> for how to go about doing it? > > > So basically you want some of the imported objects (eg wx.core.Window) > to be treated as if they were defined locally. Yes. > But I'm sure you don't > want *all* imported objects to be listed as if they're defined locally. Actually, in this case I do want all of them. The wx.core and a few other modules are really just implementation details that are required because some C/C++ compilers start to choke when compiling files more than about 60K lines of code, and because SWIG can't split a single extension module across multiple C files. For the docs my preference would be that "core" and "wx.core" does not show up anywhere, and that everything that lives in wx.core would just be documented as "wx.Whatever". > > So epydoc needs some information source to decide which imported objects > it should pretend are defined locally. > > One option is to use __all__. In particular, any imported objects > listed in __all__ will be treated as if they were defined locally. With hundreds of objects per module that gets to be a little difficult to maintain... I'll keep it in mind though. > > Another option is to define a new field for the module docstring, that > declares that an object should be treated as if it was defined locally. > Something like "@local: Window", although I'm not crazy about that name. This too. > > In either case, you would modify ModuleDoc.__init__ and > ModuleDoc._find_imported_variables, to treat the desired values as > non-imported (i.e., add them to self._x instead of self._imported_x). Yep, I discovered that bit in the code shortly after sending the prior message, and I have been experimenting a bit since then. Nothing is really working yet, but at least I'm getting very familiar with the code ;-) -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! |