On 2/22/2014 6:27 AM, Antoine Pitrou wrote:
> On Sat, 22 Feb 2014 22:13:58 +1100
> Chris Angelico <ros...@gmail.com> wrote:

>> Lib/inspect.py:1350:
>>     return sys._getframe(1) if hasattr(sys, "_getframe") else None
>> becomes
>>     return (sys._getframe(1) except AttributeError: None)
> 
> May hide a bug if sys._getframe(1) itself raises AttributeError.

return (sys._getframe except AttributeError: lambda i: None)(1)

Assuming I have the syntax correct, and the bindings work this way, of
course.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to