@@ -575,6 +575,11 @@ def open_supersets(self):
575575 r"""
576576 Generate the open supersets of ``self``.
577577
578+ .. NOTE::
579+
580+ To get the open supersets as a family, sorted by name, use the method
581+ :meth:`open_superset_family` instead.
582+
578583 EXAMPLES::
579584
580585 sage: M = Manifold(2, 'M', structure='topological')
@@ -590,6 +595,35 @@ def open_supersets(self):
590595 if superset .is_open ():
591596 yield superset
592597
598+ def open_superset_family (self ):
599+ r"""
600+ Return the family of open supersets of ``self``.
601+
602+ The family is sorted by the alphabetical names of the subsets.
603+
604+ OUTPUT:
605+
606+ - a :class:`ManifoldSubsetFiniteFamily` instance containing all the
607+ open supersets that have been defined on the current subset
608+
609+ .. NOTE::
610+
611+ If you only need to iterate over the open supersets in arbitrary
612+ order, you can use the generator method :meth:`open_supersets`
613+ instead.
614+
615+ EXAMPLES::
616+
617+ sage: M = Manifold(2, 'M', structure='topological')
618+ sage: U = M.open_subset('U')
619+ sage: V = U.subset('V')
620+ sage: W = V.subset('W')
621+ sage: W.open_superset_family()
622+ Set {M, U} of open subsets of the 2-dimensional topological manifold M
623+
624+ """
625+ return ManifoldSubsetFiniteFamily (self .open_supersets ())
626+
593627 def subsets (self ):
594628 r"""
595629 Generate the subsets that have been defined on the current subset.
0 commit comments