Steven D'Aprano <[EMAIL PROTECTED]> writes:
> I'll point at the difficulty in using getattr for extracting a function
> from the current module:
> >>> func = getattr(???, 'f') # what should go there?

Hmm, it's a pain that there's no clean way to get at the current
module.  PEP 3130 shows some icky and unreliable ways, e.g.

   func = getattr(sys.modules[__name__], 'f')

PEP 3130's goal was to add a clean way to do this.  Unfortunately it
was rejected.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to