Enhanced dir() function
rantingrick at gmail.com
Tue Jul 12 23:38:11 CEST 2011
On Jun 30, 11:29 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> The dir() function is designed for interactive use, inspecting objects for
> the names of attributes and methods.
> Here is an enhanced version that allows you to pass a glob to filter the
> names you see:
I have always believed in keeping my namespace squeaky clean so i
never have this problem. Modules like Tkinter (where you yourself have
supported the global import!) i always import as "tk". I think this IS
more a housekeeping issue than a "nail on patch" issue.
PS: However pay attention because i have some interesting ideas about
"dir culling" in my next post to this thread.
More information about the Python-list