59: Removed NameSpace.__call__ method (returned max_len)

This commit is contained in:
Jason Gerard DeRose 2008-08-06 14:27:33 +00:00
parent 2081987186
commit 62d2cd65f2

View File

@ -175,8 +175,6 @@ class NameSpace(ReadOnly):
both as instance attributes and as dictionary items. both as instance attributes and as dictionary items.
""" """
__max_len = None
def __init__(self, items, base=None): def __init__(self, items, base=None):
""" """
`items` should be an iterable providing the members of this `items` should be an iterable providing the members of this
@ -231,12 +229,6 @@ class NameSpace(ReadOnly):
return self.__hname[key] return self.__hname[key]
raise KeyError('NameSpace has no item for key %r' % 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): def __repr__(self):
if self.__base is None: if self.__base is None:
base = repr(self.__base) base = repr(self.__base)
@ -245,9 +237,6 @@ class NameSpace(ReadOnly):
return '%s(*proxies, base=%s)' % (self.__class__.__name__, base) return '%s(*proxies, base=%s)' % (self.__class__.__name__, base)
class Registrar(object): class Registrar(object):
def __init__(self, *allowed): def __init__(self, *allowed):
""" """