R. David Murray added the comment:

That's not how people use it at the interactive prompt, though.  I call 
dir(str) to find what methods I can call on an str object, not what methods I 
can call on the str class object. Same goes for my own classes.  Yes, I also 
call it on instances, but it would be very surprising, especially at this point 
in Python's history, for this to change.

It would also screw up pydoc and inspect.  Screwing up inspect is an issue 
Ethan has already brought up as a possible problem regardless, but that doesn't 
really enter into this discussion, because those two examples indicate how 
badly such a change would break existing python code outside the stdlib.

I'm going to close this issue as rejected.  The provision of a differently 
named builtin with the alternate semantics requested here could be raised on 
python-ideas, but I doubt it will get much traction since you can just do 
dir(xxx.__class__ for the rare cases where you want that info.

Aside: I haven't looked at what jedi is, but perhaps you need to rethink your 
dependence on dir, just as we (may be?) rethinking inspect's dependence on dir.

----------
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19002>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to