[Python-Dev] dir and all (original) (raw)

Josiah Carlson jcarlson at uci.edu
Sun Feb 4 20:34:31 CET 2007


See the two threads started in python-dev by Tomer Filiba on (according to my clock) July 6, 2006 and October 6, 2006, both have dir in the subject.

Giovanni Bajo <rasky at develer.com> wrote:

Hello, I could not find a PEP for dir. I was thinking today that if dir was added, I would find it useful if modules implemented it by returning all (when all is defined). Or even better, to return the same names that would be imported by a star-import (so, if all is not defined, all names which do not start with ''). This wouldn't prevent introspection tools to use mod.dict to still access the module's global dictionary, of course. But it would allow module's authors to more clearly document the module's public API. -- Giovanni Bajo


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/jcarlson%40uci.edu



More information about the Python-Dev mailing list