#12518: Enumerated set from iterator
-------------------------------------+--------------------------------------
Reporter: vdelecroix | Owner: vdelecroix
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.6
Component: combinatorics | Resolution:
Keywords: set, iterator | Work issues:
Report Upstream: N/A | Reviewers: Travis Scrimshaw
Authors: Vincent Delecroix | Merged in:
Dependencies: #12653, #13778 | Stopgaps:
-------------------------------------+--------------------------------------
Changes (by vdelecroix):
* status: positive_review => needs_work
Comment:
The following does not work
{{{
sage: from sage.sets.set_from_iterator import set_from_method
sage: class A:
... a = 10
... @set_from_method
... def f(self):
... return xsrange(self.a)
sage: a = A()
sage: a.f() # works perfectly
{0, 1, 2, 3, 4, ...}
sage: A.f(a) # does not work at all
Traceback (most recent call last):
...
TypeError: f() takes exactly 1 argument (2 given)
}}}
It causes many problems with element classes which are Cython classes.
I am on this. Sorry.
Vincent
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12518#comment:22>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.