diff --git a/bidict/_base.py b/bidict/_base.py index a5ef609..5376da5 100644 --- a/bidict/_base.py +++ b/bidict/_base.py @@ -378,7 +378,7 @@ class BidictBase(BidirectionalMapping): return len(self._fwdm) def __iter__(self): # lgtm [py/inheritance/incorrect-overridden-signature] - """Iterator over the contained items.""" + """Iterator over the contained keys.""" # No default implementation for __iter__ inherited from Mapping -> # always delegate to _fwdm. return iter(self._fwdm) diff --git a/bidict/_delegating.py b/bidict/_delegating.py index 9e0c5ce..df20183 100644 --- a/bidict/_delegating.py +++ b/bidict/_delegating.py @@ -18,7 +18,7 @@ class _DelegatingMixin: __slots__ = () def __iter__(self): - """Iterator over the contained items.""" + """Iterator over the contained keys.""" return iter(self._fwdm) # pylint: disable=protected-access def keys(self): diff --git a/bidict/_frozenordered.py b/bidict/_frozenordered.py index 00a2620..5d650a0 100644 --- a/bidict/_frozenordered.py +++ b/bidict/_frozenordered.py @@ -45,7 +45,7 @@ class FrozenOrderedBidict(OrderedBidictBase): # mutation. if DICTS_ORDERED: def __iter__(self, reverse=False): # noqa: N802 - """Iterator over the contained items.""" + """Iterator over the contained keys in insertion order.""" if reverse: return super().__iter__(reverse=True) return iter(self._fwdm._fwdm) # pylint: disable=protected-access diff --git a/bidict/_orderedbase.py b/bidict/_orderedbase.py index d4840ad..2d16c87 100644 --- a/bidict/_orderedbase.py +++ b/bidict/_orderedbase.py @@ -271,13 +271,13 @@ class OrderedBidictBase(BidictBase): assert invm[val] is nodeinv def __iter__(self, reverse=False): - """An iterator over this bidict's items in order.""" + """Iterator over the contained keys in insertion order.""" fwdm_inv = self._fwdm.inverse # pylint: disable=no-member for node in self._sntl.__iter__(reverse=reverse): yield fwdm_inv[node] def __reversed__(self): - """An iterator over this bidict's items in reverse order.""" + """Iterator over the contained keys in reverse insertion order.""" for key in self.__iter__(reverse=True): yield key