Opened 7 years ago
Closed 7 years ago
#16118 closed enhancement (invalid)
__len__ method for sage.misc.lazy_list
Reported by: | MatthieuDien | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | misc | Keywords: | days57 |
Cc: | Merged in: | ||
Authors: | Reviewers: | Marc Mezzarobba | |
Report Upstream: | N/A | Work issues: | |
Branch: | u/MatthieuDien/__len___method_for_sage_misc_lazy_list (Commits) | Commit: | ed1b53af550d86584632ef53bf07ec5d2a361344 |
Dependencies: | Stopgaps: |
Description (last modified by )
Currently, the only way to obtain the cache's length of a lazy_list
is to call info
method which print on the standard output :
sage: from sage.misc.lazy_list import lazy_list sage: l = lazy_list(NN) sage: l[42] sage: l.info() cache length 43 start 0 stop 2147483647 step 1
The goal of this ticket is to provide a __len__
method to obtain this length :
sage: from sage.misc.lazy_list import lazy_list sage: l = lazy_list(NN) sage: len(l) 0 sage: l[42] 42 sage: len(l) 43 sage: l[36] 36 sage: len(l) 43
Change History (11)
comment:1 Changed 7 years ago by
- Component changed from PLEASE CHANGE to misc
- Keywords days57 added
- Type changed from PLEASE CHANGE to enhancement
comment:2 Changed 7 years ago by
- Description modified (diff)
comment:3 Changed 7 years ago by
- Description modified (diff)
comment:4 Changed 7 years ago by
- Branch set to u/MatthieuDien/__len___method_for_sage_misc_lazy_list
comment:5 Changed 7 years ago by
- Commit set to ed1b53af550d86584632ef53bf07ec5d2a361344
- Status changed from new to needs_review
comment:6 Changed 7 years ago by
After some discussions, this ticket need to be closed See #16137
comment:7 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-duplicate/invalid/wontfix
comment:8 Changed 7 years ago by
- Status changed from needs_review to positive_review
comment:9 Changed 7 years ago by
author/reviewer names
comment:10 Changed 7 years ago by
- Reviewers set to Marc Mezzarobba
comment:11 Changed 7 years ago by
- Resolution set to invalid
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
add __len__ method for lazy_list