Opened 16 months ago
Last modified 14 months ago
#31718 closed enhancement
ManifoldSubset, Manifold: Change some methods to generators — at Version 3
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.4 |
Component: | manifolds | Keywords: | |
Cc: | gh-mjungmath, egourgoulhon, tscrim | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | u/mkoeppe/manifoldsubset__manifold__change_some_methods_to_generators (Commits, GitHub, GitLab) | Commit: | 186707ba9fe840040c6675421a65f28fc4f3999e |
Dependencies: | #31680 | Stopgaps: |
Description (last modified by )
This ticket proposes to change some methods that currently return lists to generators - like the method open_supersets
added in #31677. This is in line with the changes in the Python standard library when we moved from Python 2 to 3.
ManifoldSubset
:
open_covers()
currently returns a list of lists- change to generator of
ManifoldSubsetFiniteFamily
instances - add optional argument
trivial
to simplify the common use case that only needs nontrivial open covers
- change to generator of
subsets()
currently returns afrozenset
- change to generator of
ManifoldSubset
instances
- change to generator of
Manifold
:
top_charts()
currently returns a list- change to generator of charts
coord_changes()
currently returns a copy- change to generator of pairs
((from, to), map)
... so thatdict(M.coord_changes())
will create the copy
- change to generator of pairs
Change History (3)
comment:1 Changed 16 months ago by
- Branch set to u/mkoeppe/manifoldsubset__manifold__change_some_methods_to_generators
comment:2 Changed 16 months ago by
- Commit set to 186707ba9fe840040c6675421a65f28fc4f3999e
- Description modified (diff)
comment:3 Changed 16 months ago by
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
New commits:
ManifoldSubset.subsets: Change to generator