mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-03 08:04:07 +01:00
Revert some instances of s/iteritems/items/ in be118c3338
.
This commit is contained in:
parent
9c57199838
commit
95a1f21600
@ -219,9 +219,9 @@ class IterableMap(object):
|
|||||||
"""Define .items() in a class and subclass this to get the other iters.
|
"""Define .items() in a class and subclass this to get the other iters.
|
||||||
"""
|
"""
|
||||||
def items(self):
|
def items(self):
|
||||||
if minisix.PY3 and hasattr(self, 'items'):
|
if minisix.PY3 and hasattr(self, 'iteritems'):
|
||||||
# For old plugins
|
# For old plugins
|
||||||
return getattr(self, 'items')() # avoid 2to3
|
return self.iteritems() # avoid 2to3
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
__iter__ = items
|
__iter__ = items
|
||||||
|
@ -381,8 +381,8 @@ class MaxLengthQueue(queue):
|
|||||||
class TwoWayDictionary(dict):
|
class TwoWayDictionary(dict):
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
def __init__(self, seq=(), **kwargs):
|
def __init__(self, seq=(), **kwargs):
|
||||||
if hasattr(seq, 'items'):
|
if hasattr(seq, 'iteritems'):
|
||||||
seq = seq.items()
|
seq = seq.iteritems()
|
||||||
elif hasattr(seq, 'items'):
|
elif hasattr(seq, 'items'):
|
||||||
seq = seq.items()
|
seq = seq.items()
|
||||||
for (key, value) in seq:
|
for (key, value) in seq:
|
||||||
|
Loading…
Reference in New Issue
Block a user