[Numpy-discussion] Sphinx/Numpydoc, attributes and property

Fabricio Silva silva at lma.cnrs-mrs.fr
Thu Oct 22 18:42:16 EDT 2009


It seems that


class Profil(object):        
    def __init__(self):
      """
      """
      pass
    
    def bla(self):
        "Blabla."
        return 0
        
    @property
    def tdeb(self):
        "The time horizon startpoint."
        return self.pts[0,:].min()

> and a foo.rst containing
:mod:`foo` -- BlaTitle
=====================================================
        
.. autoclass:: foo.Profil
   :members: bla, tdeb

produces a listing untitled "Methods" with methods bla and tdeb. Despite
tdeb is defined as a method, the decorator make tdeb be a property which
I would treat as an attribute and put it in the attribute list. That is
not what is done in sphinx/numpydoc. Who is to "blame" ? Sphinx or
NumpyDoc ?


-- 
Fabrice Silva
Laboratory of Mechanics and Acoustics (CNRS, UPR 7051)





More information about the NumPy-Discussion mailing list