On Thu, Jul 20, 2000 at 09:14:26AM -0500, Skip Montanaro wrote: > >> #2. Why doesn't dir( obj ) return inherited methods? > Thomas> Because inherited methods (and other inherited attributes) > Thomas> aren't stored in an instance's __dict__. > dir() *could* be smarter and walk up the chain starting at __class__ looking > for useful stuff to include. Unfortunately, dir() is written in C so it's > harder to modify than it ought to be... I would suggest adding a second, optional argument to dir(), 'recurse' or such, to add that behaviour. I think I can add that code to dir() if it's deemed a good idea ;) Turning it on by default would probably break too much code. Opinions ? -- Thomas Wouters <thomas@xs4all.net> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4