self.update(kwargs)
def __iter__(self):
- for k, v in self.items():
+ for k, v in self.iteritems():
yield k
def __len__(self):
l = 0
- for i in self.items():
+ for i in self.iteritems():
l += 1
return l
return list(self.iteritems())
def itervalues(self):
- for k, v in self.items():
+ for k, v in self.iteritems():
yield v
def values(self):
def popitem(self):
try:
- k, v = next(iter(self.items()))
+ k, v = self.iteritems().next()
except StopIteration:
raise KeyError('container is empty')
del self[k]
pass
def __str__(self):
- return str(dict(self.items()))
+ return str(dict(self.iteritems()))
if sys.hexversion >= 0x3000000:
items = iteritems