ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

Dave Cinege dave at cinege.com
Wed Dec 12 20:20:19 CET 2012


On Tuesday 11 December 2012 01:41:38 Ian Kelly wrote:

> I have a few critiques on the code.  First, you might want to use
> __getattribute__ instead of __getattr__.  Otherwise you'll end up

  File "/home/dcinege/src/thesaurus/thesaurus.py", line 84, in 
__getattribute__
    return self.__getitem__(name)
RuntimeError: maximum recursion depth exceeded while calling a Python object

This takes me into the same hell as when I was trying to implement this as a 
class. Someone else would have to take the time to do this. __getattr__ doing 
what I expect it to do, for what i do.

Dave





More information about the Python-list mailing list