[Python-Dev] No __bases__ in dir()

Terry Reedy tjreedy at udel.edu
Sat Mar 15 23:13:18 CET 2008


"Guido van Rossum" <guido at python.org> wrote in message 
news:ca471dc20803151210l30209673wb44556a3650c4a5 at mail.gmail.com...
| In Py3k, dir() will allow any class to makes its instances special
| cases by defining __dir__().

Nice.  Then the current special case will become explainable as 
type.__dir__ excluding type's numerous attibutes, to avoid clutter, and we 
should have fewer discussions about what dir() 'ought' to return ;-) 





More information about the Python-Dev mailing list