__dir__ deleted

This commit is contained in:
gwen 2012-10-05 11:02:58 +02:00
parent a2f9beb9f4
commit 8ca58c508d
2 changed files with 9 additions and 9 deletions

View File

@ -102,10 +102,10 @@ def test_str():
c = Config(descr) c = Config(descr)
print c # does not crash print c # does not crash
def test_dir(): #def test_dir():
descr = make_description() # descr = make_description()
c = Config(descr) # c = Config(descr)
print dir(c) # print dir(c)
def test_make_dict(): def test_make_dict():
"serialization of the whole config to a dict" "serialization of the whole config to a dict"

View File

@ -267,11 +267,11 @@ class Config(object):
return self._cfgimpl_values[name] return self._cfgimpl_values[name]
def __dir__(self): # def __dir__(self):
#from_type = dir(type(self)) # #from_type = dir(type(self))
from_dict = list(self.__dict__) # from_dict = list(self.__dict__)
extras = list(self._cfgimpl_values) # extras = list(self._cfgimpl_values)
return sorted(set(extras + from_dict)) # return sorted(set(extras + from_dict))
def unwrap_from_name(self, name): def unwrap_from_name(self, name):
# didn't have to stoop so low: `self.get()` must be the proper method # didn't have to stoop so low: `self.get()` must be the proper method