Steps To Reproduce
If you construct Set_object_enumerated directly with a generator, its contents won't be stored
(same with Set_object_enumerated_with_category).
sage: from sage.sets.set import Set_object_enumerated
sage: a = Set_object_enumerated(i for i in range(3))
sage: a
{0, 1, 2}
sage: a
{}
Expected Behavior
This is quite unintuitive, since it differs from the behaviour of Set and Python's set.
sage: s = Set(i for i in range(3))
sage: s
{0, 1, 2}
sage: s
{0, 1, 2}
sage:
sage: s = set(i for i in range(3))
sage: s
{0, 1, 2}
sage: s
{0, 1, 2}
Actual Behavior
As above.
Additional Information
No response
Environment
- OS: Linux
- Sage Version: 10.6
Checklist
Steps To Reproduce
If you construct
Set_object_enumerateddirectly with a generator, its contents won't be stored(same with
Set_object_enumerated_with_category).Expected Behavior
This is quite unintuitive, since it differs from the behaviour of
Setand Python'sset.Actual Behavior
As above.
Additional Information
No response
Environment
Checklist