[Trac #1075] gettext-like docstring translation matrix
Zarro Boogs per Child
bugtracker at laptop.org
Wed Mar 21 02:39:02 EDT 2007
#1075: gettext-like docstring translation matrix
---------------------------+------------------------------------------------
Reporter: orospakr | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: BTest-3
Component: documentation | Resolution:
Keywords: |
---------------------------+------------------------------------------------
Comment (by orospakr):
Replying to [ticket:1075 orospakr]:
> The tool itself could readily (and cleanly) implemented in Python, using
AST reflection to discover docstrings in modules.
Just a note, AST reflection won't work for native modules, like some of
the standard library.
Another method involves importing the modules and iterating over things
like {{{__all__}}}. However, that actually involves loading the code into
memory, and some modules will execute things on load!
As a result, some documentation tools (like epydoc) apply some heuristics
and use different methods for reflection. It's a bit gross.
It would be nice if Python had a single means to read docstrings (and
other metadata) from all types of modules, without allowing them to
execute code...
--
Ticket URL: <http://dev.laptop.org/ticket/1075#comment:4>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list