is passed to the update() method (similar to the dict constructor), and also
pass keyword arguments into the update() method if any are given. This makes
it possible to use the constructor similarly to the way that the
_emerge.SlotObject constructor is used.
svn path=/main/trunk/; revision=11230
__slots__ = ("__weakref__",) + \
tuple(prefix + k for k in allowed_keys)
+ def __init__(self, *args, **kwargs):
+
+ if len(args) > 1:
+ raise TypeError(
+ "expected at most 1 positional argument, got " + \
+ repr(1 + len(args)))
+
+ if args:
+ self.update(args[0])
+
+ if kwargs:
+ self.update(kwargs)
+
def __iter__(self):
for k, v in self.iteritems():
yield k