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/2013-October/129626.html below:

[Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

[Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore(). [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().Victor Stinner victor.stinner at gmail.com
Wed Oct 16 14:01:37 CEST 2013
2013/10/16 Antoine Pitrou <solipsis at pitrou.net>:
>> By the way, what are the performances of contextlib.ignore()?
>> Exceptions can be slow in some cases. Adding something even slower
>> would not be a good idea.
>
> A "try" block which succeeds is fast.

Ah yes, I never reminder this fact. I try to not care too much of
micro-optimizations :-)

> A context manager will always be
> slower, especially when written in pure Python with a generator wrapped
> in a contextlib.contextmanager.

ignore() is much slower than try/except even if the block succeeds?

Victor
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