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.
|
||||
"""
|
||||
def items(self):
|
||||
if minisix.PY3 and hasattr(self, 'items'):
|
||||
if minisix.PY3 and hasattr(self, 'iteritems'):
|
||||
# For old plugins
|
||||
return getattr(self, 'items')() # avoid 2to3
|
||||
return self.iteritems() # avoid 2to3
|
||||
else:
|
||||
raise NotImplementedError()
|
||||
__iter__ = items
|
||||
|
@ -381,8 +381,8 @@ class MaxLengthQueue(queue):
|
||||
class TwoWayDictionary(dict):
|
||||
__slots__ = ()
|
||||
def __init__(self, seq=(), **kwargs):
|
||||
if hasattr(seq, 'items'):
|
||||
seq = seq.items()
|
||||
if hasattr(seq, 'iteritems'):
|
||||
seq = seq.iteritems()
|
||||
elif hasattr(seq, 'items'):
|
||||
seq = seq.items()
|
||||
for (key, value) in seq:
|
||||
|
Loading…
Reference in New Issue
Block a user