pyt...@bdurham.com wrote:

> For completeness, here is the corrected version of my original code for
> the archives:
> 
> [ eval(x)() for x in dir() if hasattr( eval(x), '_included') ]

Another eval-free variant:

[x() for x in vars().values() if hasattr(x, "_included")]

If you use getattr(x, "_included", False) instead of hasattr() you
can "un-include" functions with 

f._included = False 

instead of 

del f._included

Peter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to