[Python-Dev] Consistency questions

Gordon McMillan gmcm@hypernet.com
Thu, 20 Jul 2000 13:03:13 -0400


Skip Montanaro wrote:

> 
>     Thomas> I would suggest adding a second, optional argument to
>     dir(), Thomas> 'recurse' or such, to add that behaviour. I
>     think I can add that Thomas> code to dir() if it's deemed a
>     good idea ;) Turning it on by Thomas> default would probably
>     break too much code.
> 
> I don't think so.  I suspect most people use dir() interactively
> to see what attributes an object supports and would appreciate
> the improved functionality.  Besides, we are talking 2.0 here. 
> Nothing wrong with a little breakage... ;-)

In the std lib:
  cmd.py (already looks in __class__ and __bases__),  
  rlcompleter (doesn't), 
  rexec (only invoked on modules?).

It seems a gratuitous breakage, since it's additional behavior, 
not fixed behavior.

- Gordon