Opened 16 months ago

Last modified 14 months ago

#31718 closed enhancement

ManifoldSubset, Manifold: Change some methods to generators — at Version 2

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:

Status badges

Description (last modified by mkoeppe)

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
  • subsets() currently returns a frozenset
    • change to generator of ManifoldSubset instances

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 that dict(M.coord_changes()) will create the copy

Change History (2)

comment:1 Changed 16 months ago by mkoeppe

  • Branch set to u/mkoeppe/manifoldsubset__manifold__change_some_methods_to_generators

comment:2 Changed 16 months ago by mkoeppe

  • Commit set to 186707ba9fe840040c6675421a65f28fc4f3999e
  • Description modified (diff)

New commits:

186707bManifoldSubset.subsets: Change to generator
Note: See TracTickets for help on using tickets.