del self[k]
return (k, v)
- def update(self, other=None, **kwargs):
+ def update(self, *args, **kwargs):
+ if len(args) > 1:
+ raise TypeError(
+ "expected at most 1 positional argument, got " + \
+ repr(len(args)))
+ other = None
+ if args:
+ other = args[0]
if other is None:
pass
elif hasattr(other, 'iteritems'):
self[key] = default
return default
- def update(self, other=None, **kwargs):
+ def update(self, *args, **kwargs):
+ if len(args) > 1:
+ raise TypeError(
+ "expected at most 1 positional argument, got " + \
+ repr(len(args)))
+ other = None
+ if args:
+ other = args[0]
if other is None:
pass
elif hasattr(other, 'iteritems'):