http://docs.python.org/3/library/functions.html#dir:

Note:  Because dir() is supplied primarily as a convenience for
 use at an interactive prompt [...]

I suspect this comment is out of date, as there are two functions in the inspect module that rely on dir(), which also means that help indirectly relies on dir(). And we also now have the __dir__ method that we can use to customize what gets returned.

[...] more than it tries to supply a rigorously or consistently
defined set of names, [...]

If this is still true, should inspect be relying on dir()?

--
~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to