2013/10/16 Antoine Pitrou <solip...@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 _______________________________________________ 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