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
For example `Deprecated` could be either __deprecated__
or __depreciated__ since they're both tags of
'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.
Log in to post a comment.