Opened 14 years ago

Closed 6 years ago

#5768 closed defect (invalid)

improve coverage of generators.pyx

Reported by: William Stein Owned by: Michael Abshoff
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: doctest coverage Keywords:
Cc: Minh Van Nguyen Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Change History (9)

comment:1 Changed 14 years ago by William Stein

This file is just scary. The second function I tried to document is:

    cpdef get_from_index(self, i):
        return self._obj._gen_(i)

I couldn't find any object in all of Sage with a _gen_ method -- I see now way this could ever work. Hence I can't see any way Generators_naturals would ever work. This whole file just scares me. I don't get it at all.

I give up.

This file was evidently 100% part of this changeset:

changeset:   10231:8dea97c4b4f0
parent:      10067:717c10d9cd4a
user:        David Roe <>
date:        Tue Jul 29 01:24:30 2008 -0700
summary:     generators object

I rue the day I ever allowed a single non-doctested function into Sage.

comment:2 Changed 13 years ago by Karl-Dieter Crisman

Cc: Minh Van Nguyen added
Report Upstream: N/A

Current status of that function:

    cpdef get_from_index(self, i):
            sage: from sage.structure.generators import Generators_list
            sage: gens = Generators_list(ZZ, [5,9], Rings)
            sage: gens.get_from_index(0)

Though still

SCORE /Users/.../sage-4.4.2/devel/sage/sage/structure/generators.pyx: 11% (5 of 45)

Missing documentation:
	 * __init__(self, Generators gens):
	 * next(self):
	 * __iter__(self):
	 * __init__(self, obj, index_set, category):
	 * get_from_index(self, i):
	 * __contains__(self, x):
	 * __call__(self, i):
	 * __getitem__(self, i):
	 * __iter__(self):
	 * __len__(self):
	 * index_set(self):
	 * category(self):
	 * obj(self):
	 * count(self):
	 * list(self):
	 * _repr_(self):
	 * count(self):
	 * __cmp__(self, other_unty):
	 * _repr_(self):
	 * __reduce__(self):
	 * make_finite_gens(obj, n, index_set, category):
	 * __reduce__(self):
	 * __cmp__(left, _right):
	 * _repr_(self):
	 * __init__(self, obj, category):
	 * count(self):
	 * __getitem__(self, i):
	 * __init__(self, obj, category = None):
	 * get_from_index(self, i):
	 * __contains__(self, x):
	 * __iter__(self):
	 * index_set(self):
	 * count(self):
	 * list(self):
	 * __init__(self, G, index_set, category, computing_function):
	 * get_from_index(self, i):
	 * count(self):
	 * list(self):
	 * _repr_(self):

Missing doctests:
	 * __init__(self, obj, n, index_set, category):

Possibly wrong (function name doesn't occur in doctests):
	 * make_list_gens(*args):

So there is yet work to be done.

comment:3 Changed 10 years ago by Travis Scrimshaw

Quick note, it seems this file is currently in 5.7.beta3 referenced only in structure/category_object.pyx to handle the to-be-deprecated(tm) ParentWithGens. So this file might be obsolete...

comment:4 Changed 9 years ago by Jeroen Demeyer

Milestone: sage-5.11sage-5.12

comment:5 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:6 Changed 9 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:7 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4

comment:8 Changed 6 years ago by Jeroen Demeyer

Milestone: sage-6.4sage-duplicate/invalid/wontfix
Status: newneeds_review

This module will be completely removed in #21382.

comment:9 Changed 6 years ago by Jeroen Demeyer

Resolution: invalid
Reviewers: Jeroen Demeyer
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.