Commit
1 year ago
gh-37904: Change `SetSystem` representation This is an attempt to represent `SetSystem` in a more informative and user-friendly way. Previous: ``` sage: M = matroids.CompleteGraphic(7) sage: M.bases() Iterator over a system of subsets ``` Current: ``` sage: M = matroids.CompleteGraphic(7) sage: M.bases() SetSystem of 16807 sets over 21 elements ``` I think this is an improvement from resorting to calling, e.g., `len`, in order to to get some info, after you get struck with `Iterator over a system of subsets`. Note that a `SetSystem` is not an iterator but simply an iterable (so `__repr__` is also misleading). The previous developers were planning to make it into an _actual_ iterator, as can be seen on [L66](https://githu b.com/sagemath/sage/blob/f1dc325cf01ac542d42257b77aa322cd92e74de8/src/sa ge/matroids/set_system.pyx#L66) of `set_system.pyx`. URL: https://github.com/sagemath/sage/pull/37904 Reported by: gmou3 Reviewer(s): Travis Scrimshaw
Author
Release Manager
Loading