Peter, > 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 ...
YES! That's what I was struggling to do with my in-elegant use of eval(), eg. replacing eval() to expand dir() strings with a dictionary of local objects. Question: why vars() vs. globals()? My tests in IDLE (Python 2.6) show vars() and globals() returning the same items. Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list