[IronPython] Logging module

Dan Eloff dan.eloff at gmail.com
Tue Feb 17 21:08:46 CET 2009

On Tue, Feb 17, 2009 at 1:18 PM, Shri Borde <Shri.Borde at microsoft.com> wrote:

>So there may still be a perf concern. However, since I am speculating at this point, I will revert to saying >that the simpler solution should be tried first (which you have), and worry about perf only when there is >specific data.

Why not encapsulate the functionality into a simple function call:

def getsrcfile():
    global getsrcfile
        return sys._getframe(2).yaddayadda
    except ValueError:
        getsrcfile = lambda: None
        return None

Please correct me if I'm wrong, but that should eliminate the perf concern?

(Note: I haven't actually looked at the logging module code)


More information about the Ironpython-users mailing list