Re: [Python-Dev] No __bases__ in dir() On Sat, Mar 15, 2008 at 1:11 PM, Nick Coghlan  wrote:
> Guido van Rossum wrote:
>  > This is because dir() special-cases classes, isn't it?
>
>  Avoiding infinite recursion in dir(type) might be fun if that special
>  case was removed without due care and attention...

I wasn't suggeting removing the special-casing -- rather I was
explaining the observed behavior.

In Py3k, dir() will allow any class to makes its instances special
cases by defining __dir__().

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
zvllln-eum@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40tangomu.com


