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/2015-May/140190.html below:

[Python-Dev] [Python-checkins] cpython (3.4): Issue #23840: tokenize.open() now closes the temporary binary file on error to

[Python-Dev] [Python-checkins] cpython (3.4): Issue #23840: tokenize.open() now closes the temporary binary file on error to [Python-Dev] [Python-checkins] cpython (3.4): Issue #23840: tokenize.open() now closes the temporary binary file on error toVictor Stinner victor.stinner at gmail.com
Tue May 26 09:54:49 CEST 2015
2015-05-26 8:44 GMT+02:00 Serhiy Storchaka <storchaka at gmail.com>:
> No, finally is not correct there. buffer shouldn't be closed if no exception
> is raised.

Yep. The binary file must only be closed in case of error, as written
in the commit message.

> And this is one of the cases in which bare 'except:' is absolutely legal.

The "except: <cleanup code>; raise" is common in the Python stdlib.

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