summaryrefslogtreecommitdiffstats
path: root/pym/portage/cache/mappings.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-02-21 22:07:51 +0000
committerZac Medico <zmedico@gentoo.org>2009-02-21 22:07:51 +0000
commit8ad7d9d8941a53b9cb5bdb4b835dded508c7c1ce (patch)
tree0d6c9fd612915bac8cba705d4e4aca0e13d3527e /pym/portage/cache/mappings.py
parentb612926a04a7ef31029e27229dea2a9d1dbddb2c (diff)
downloadportage-8ad7d9d8941a53b9cb5bdb4b835dded508c7c1ce.tar.gz
portage-8ad7d9d8941a53b9cb5bdb4b835dded508c7c1ce.tar.bz2
portage-8ad7d9d8941a53b9cb5bdb4b835dded508c7c1ce.zip
Make the UserDict and LazyItemsDict constructors use an optional positional
argument instead of a keyword argument. svn path=/main/trunk/; revision=12674
Diffstat (limited to 'pym/portage/cache/mappings.py')
-rw-r--r--pym/portage/cache/mappings.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/pym/portage/cache/mappings.py b/pym/portage/cache/mappings.py
index a632ce61d..1117b855b 100644
--- a/pym/portage/cache/mappings.py
+++ b/pym/portage/cache/mappings.py
@@ -139,10 +139,16 @@ class UserDict(MutableMapping):
http://bugs.python.org/issue2876
"""
- def __init__(self, dict=None, **kwargs):
- self.data = {}
- if dict is not None:
- self.update(dict)
+ def __init__(self, *args, **kwargs):
+
+ if len(args) > 1:
+ raise TypeError(
+ "expected at most 1 positional argument, got " + \
+ repr(len(args)))
+
+ if args:
+ self.update(args[0])
+
if kwargs:
self.update(kwargs)