Ticket #5255 (closed defect: fixed)
[with patch, positive review] Deprecating the use of iterator in CombinatorialClass
|Reported by:||hivert||Owned by:||mhansen|
Right now, when one want's to iterate along a combinatorial class C, there is at least three solution:
[ x for x in C.iterator() ] [ x for x in C.__iter__() ] [ x for x in C ]
There is no semantic differences beetween these three and there should not be any mesurable speedup for any. The latter solution is sintactically better and perfectly python/Sage idiomatic. So the goal of this patch is to mark the use of C.iterator() as deprecated *ASAP* (there are already 96 definition and something close to 400 uses in sage-combinat).
A subsequent series of patches should apply this rule trough all combinatorial classes. Right now to avoid breaking doctests the raising of the deprecation warning is commented out. I'll uncomment it after the series of patches.
- Summary changed from [with patch, needs review] Deprecating the use of iterator in CombinatorialClass to [with patch, positive review] Deprecating the use of iterator in CombinatorialClass