The problem is probably the space between "ngens" and the parenthesis.
David

On Mon, Jun 22, 2009 at 1:30 PM, Simon King <simon.k...@uni-jena.de> wrote:

>
> Hi William,
>
> On Jun 22, 6:33 pm, William Stein <wst...@gmail.com> wrote:
> > It's not a proper parser.  It's just a quick "hack" that goes through
> > the text file and grabs """ (triple quoted strings).  It even would
> > break if you use ''' instead of """.
>
> I hope you didn't take offense in what I wrote!
>
> >  Somebody, maybe you, will make
> > it better.
>
> If I find the time. Currently I am concerned with a relocation to
> another country.
>
> Hum. I already have a function that recursively lists all things
> contained in an importable thing (e.g., you give it a package foo, and
> it returns the docstrings for all methods of all classes/class
> instances in all modules of foo).
>
> So, this could be a building brick for something more precise. It
> would work on the level of importable things, but not on the level of
> source files, though. And it fails to find cdef-methods, since it
> relies on Python's introspection.
>
> > Precise bug reports would help a lot too, actually.
>
> Here is the thing with ngens:
>    def ngens (self):
>        """
>        Return the number of generators of self
>
>        NOTE:
>
>        We consider the scalar ``1`` as a generator.
>
>        EXAMPLES:
>
>        We use a temporary root directory, that will be
>        removed when quitting Sage.
>        ::
>
>            sage: from pGroupCohomology.cohomology import COHO
>            sage: tmp_root = tmp_filename()
>            sage: H=COHO(8,3,root=tmp_root)
>            sage: H.make()
>            sage: H.ngens()
>            4
>            sage: len(H.gens())
>            4
>
>        """
>        return len(self.Gen)+1
>
> Running sage -coverage on a file bla.py with the above content yields:
> ----------------------------------------------------------------------
> bla.py
> SCORE bla.py: 100% (1 of 1)
>
> Possibly wrong (function name doesn't occur in doctests):
>         * ngens (self):
>
> ----------------------------------------------------------------------
>
>
> Cheers,
>     Simon
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to