A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-February/132680.html below:

[Python-Dev] PEP 463: Exception-catching expressions

[Python-Dev] PEP 463: Exception-catching expressions [Python-Dev] PEP 463: Exception-catching expressionsEric V. Smith eric at trueblade.com
Sat Feb 22 13:22:17 CET 2014
On 2/22/2014 6:27 AM, Antoine Pitrou wrote:
> On Sat, 22 Feb 2014 22:13:58 +1100
> Chris Angelico <rosuav at 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.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4