Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit a0ac11b

Browse files
committed
#14982 Map.domains(): improve documentation
1 parent d995645 commit a0ac11b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/sage/categories/map.pyx

+12-4
Original file line numberDiff line numberDiff line change
@@ -593,10 +593,14 @@ cdef class Map(Element):
593593

594594
def domains(self):
595595
"""
596-
Yield the domain of self. In general, iterate over the domains of
597-
the factors of a composite map.
596+
Iterate over the domains of the factors of a (composite) map.
597+
598+
This default implementation simply yields the domain of this map.
599+
600+
.. SEEALSO:: :meth:`FormalCompositeMap.domains`
598601
599602
EXAMPLES::
603+
600604
sage: list(QQ.coerce_map_from(ZZ).domains())
601605
[Integer Ring]
602606
"""
@@ -1917,9 +1921,13 @@ cdef class FormalCompositeMap(Map):
19171921

19181922
def domains(self):
19191923
"""
1920-
Iterate over the domains of the factors of self.
1924+
Iterate over the domains of the factors of this map.
19211925
1922-
EXAMPLES:::
1926+
(This is useful in particular to check for loops in coercion maps.)
1927+
1928+
.. SEEALSO:: :meth:`Map.domains`
1929+
1930+
EXAMPLES::
19231931
19241932
sage: f = QQ.coerce_map_from(ZZ)
19251933
sage: g = MatrixSpace(QQ, 2, 2).coerce_map_from(QQ)

0 commit comments

Comments
 (0)