Dan Eloff wrote:
On Tue, Feb 17, 2009 at 1:18 PM, Shri Borde <[email protected]> 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
try:
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?
It's not quite structured like that. The patch has been accepted now and
I think will be fine. If there are any real production issues it can be
revisited.
Michael
(Note: I haven't actually looked at the logging module code)
-Dan
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com