Hacker News new | ask | show | jobs
by jabwork 4661 days ago
Python objects can override __dir__, which is all dir() calls anyway.

It looks like this is all for an autocompletion library. Why not just write jedi.dir (jedir?)

1 comments

I personally haven't wanted dir() to do this, however I guess I could see the case for an extension to dir such as:

dir(inst, traverseclass=True)

Maybe the author should write a PEP?