I recommend extending the DocstringField class so that
e.g. DocstringField(['version'], 'Version',
multivalue=0) also parses the attribute __version__ (of
whatever: a module, a class, a function).
The parser could lookup hasattr(obj, '__%s__' % tag),
tag being every singe tag declared in
DocstringField(tags=[]).
For example `Deprecated` could be either __deprecated__
or __depreciated__ since they're both tags of
`Deprecated`: DocstringField(['deprecated',
'depreciated'], 'Deprecated', multivalue=0).
If multivalue is False (in a boolean context), the
content of __tag__ has to be str(..)-able (perhaps,
checking for isinstance(.., (int, str)) is better
because "Version: [2, 5, 0, 'alpha']" just looks ugly.
Could be worked-around with an "".join -- I hope you
get what I mean), and if multivalue is True it can be a
tuple or list or what-so-ever parsed as if you wrote
into your docstring:
"""@tag: first content
@tag: second content"""
I think this will improve inter-docparsing-ability
since epydoc would be parsing what is already in the
most cases given and not inventing a new scheme.
Thank you for reading.
Logged In: YES
user_id=1053920
Originator: NO
I want to do something like this for 3.0 release, if not too hard.
Logged In: YES
user_id=195958
Originator: NO
Added in rev1490. Field->varaible mappings must be explicitly specified via a new argument to the DocstringField constructor. (I prefer this because some fields don't seem to me to make sense to have var mappings, such as __see__).
When introspecting, values can be str, unicode, int, float, bool, or None; or for multivalue fields, a list or tuple of those.
When parsing, values can be str; or for multivalue fields, a list or tuple of str.