On Mon, Sep 8, 2008 at 5:17 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Also note that e.g. epydoc is not particularly smart about what it understands
> as a signature. One might consider that a bug in epydoc, but as long as we can
> generate a simple-enough signature that it can parse and that users can read,
> I don't think there's much gained by additionally providing type information,
> for example.
>

But what about IPython? Type information is valuable when typing, for example

In [1]: from petsc4py import PETSc
In [2]: PETSc.Mat.mult?
Type:           method_descriptor
Base Class:     <type 'method_descriptor'>
String Form:    <method 'mult' of 'petsc4py.PETSc.Mat' objects>
Namespace:      Interactive
Docstring:
    mult(self, Vec x, Vec y)

>
>> Other stuff I'm not sure how to render is __get__/__set__/__del__ on
>> properties. Should I generate docstrings for them?
>
> There's only one visible docstring for them, which is the docstring of the
> property itself (i.e. of the descriptor). So augmenting the docstring doesn't
> make much sense.

OK, so getting this (at least inside IPython) is just fine, right?

In [3]: PETSc.Vec.size
Out[3]: <attribute 'size' of 'petsc4py.PETSc.Vec' objects>

In [4]: PETSc.Mat.size
Out[4]: <attribute 'size' of 'petsc4py.PETSc.Mat' objects>



>
> Stefan
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to