This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Ramchandra Apte, davidhalter, ethan.furman, r.david.murray
Date 2013-09-11.17:22:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378920130.75.0.201457355521.issue19002@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-09-11 17:22:10r.david.murraysetrecipients: + r.david.murray, ethan.furman, Ramchandra Apte, davidhalter
2013-09-11 17:22:10r.david.murraysetmessageid: <1378920130.75.0.201457355521.issue19002@psf.upfronthosting.co.za>
2013-09-11 17:22:10r.david.murraylinkissue19002 messages
2013-09-11 17:22:10r.david.murraycreate