[Epydoc-devel] How to document properties?
Brought to you by:
edloper
From: Hans M. <me...@in...> - 2007-05-14 08:34:42
|
Hi! On the page I recently posted, I note a problem I currently have - e.g. I want to document my base class for XFig objects: class Object(object): """Base class of all fig objects. Handles common properties like - lineStyle (see `lineStyleXXX` constants) - lineWidth (1/80th inch) - styleValue (dash length / dot gap ratio), in 1/80th inches - penColor, fillColor (see `colorXXX` constants) - fillStyle (see `fillStyleXXX` constants) - depth (0-999) - joinStyle (see `joinStyleXXX` constants) - capStyle (see `capStyleXXX` constants) - forwardArrow/backwardArrow (`Arrow` objects)""" def __init__(self): self.lineStyle = lineStyleDefault self.lineWidth = 1 self.penColor = colorDefault self.fillColor = colorDefault self.depth = 50 self.penStyle = 0 # not used self.fillStyle = fillStyleNone self.styleValue = 3.0 self.joinStyle = 0 self.capStyle = 0 self.radius = -1 self.forwardArrow = None self.backwardArrow = None As you can see (yes, this is the complete API), the user is supposed to directly access these properties of XFig objects. However, I would like to have them listed in the API documentation in the "properties" section. Can you advise me how to approach this? http://kogs-www.informatik.uni-hamburg.de/~meine/software/figpy/apidox/fig.Object-class.html As you can read here: http://kogs-www.informatik.uni-hamburg.de/~meine/software/figpy/#api-documentation I don't like the large list of "variables" either, which are in fact constants and some kind of enum. (Please tell me a better Python API for such constants if you know one.) -- Ciao, / / /--/ / / ANS |