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

Commit

Permalink
src/sage/sets/family.py: Add doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Aug 25, 2022
1 parent 5936c6b commit 66874a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sage/sets/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,12 @@ def items(self):
A key can only appear once, but if the function is not injective, values may
appear multiple times.
EXAMPLES::
sage: f = Family([-2, -1, 0, 1, 2], abs)
sage: list(f.items())
[(-2, 2), (-1, 1), (0, 0), (1, 1), (2, 2)]
"""
return zip(self.keys(), self.values())

Expand Down

0 comments on commit 66874a9

Please sign in to comment.