From 62d2cd65f22f748ec8db3d56d1baa9a533d4f11d Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Wed, 6 Aug 2008 14:27:33 +0000 Subject: 59: Removed NameSpace.__call__ method (returned max_len) --- ipalib/plugable.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'ipalib/plugable.py') diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 7602bce3..fe4a4531 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -175,8 +175,6 @@ class NameSpace(ReadOnly): both as instance attributes and as dictionary items. """ - __max_len = None - def __init__(self, items, base=None): """ `items` should be an iterable providing the members of this @@ -231,12 +229,6 @@ class NameSpace(ReadOnly): return self.__hname[key] raise KeyError('NameSpace has no item for key %r' % key) - def __call__(self): - if self.__max_len is None: - ml = max(len(k) for k in self.__pname) - object.__setattr__(self, '_NameSpace__max_len', ml) - return self.__max_len - def __repr__(self): if self.__base is None: base = repr(self.__base) @@ -245,9 +237,6 @@ class NameSpace(ReadOnly): return '%s(*proxies, base=%s)' % (self.__class__.__name__, base) - - - class Registrar(object): def __init__(self, *allowed): """ -- cgit