[Python-ideas] dir with a glob?

Terry Reedy tjreedy at udel.edu
Fri Jul 1 01:38:11 CEST 2011


On 6/30/2011 8:41 AM, Joao S. O. Bueno wrote:

> I believe a second parameter to dir, being  a glob filter string, would be
> fine. Being able to type:
>
> dir (gtk.Window, "set*")
>
> , for example
> instead of
>
> [attrib for attrib in dir(gtk.Window) if attrib.startswith("set")]
>
>
> would be indeed a good thing to have.

Ihad much the same thought. I am still trying to see what is wrong with 
it. It might be worth a feature request.





More information about the Python-ideas mailing list