Skip to content

ManifoldSubset: Change some methods to generators #31718

@mkoeppe

Description

@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
    • add optional argument trivial to simplify the common use case that only needs the nontrivial open covers
  • subsets() currently returns a frozenset

    • change to generator of ManifoldSubset instances

These API changes will probably make some updates to sage.manifolds worksheets that are maintained outside of the Sage tree necessary.

Follow-up for some methods of Manifold in #31720.

Depends on #31680

CC: @mjungmath @egourgoulhon @tscrim

Component: manifolds

Author: Matthias Koeppe

Branch/Commit: e026e7a

Reviewer: Eric Gourgoulhon

Issue created by migration from https://trac.sagemath.org/ticket/31718

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions