[Python-checkins] cpython: Simplify and remove few dependencies on 'errno', thanks to PEP 3151.
Terry Reedy
tjreedy at udel.edu
Fri Oct 28 20:30:55 CEST 2011
On 10/28/2011 10:07 AM, florent.xicluna wrote:
> def _stat(fn):
> try:
> f = open(fn)
> - except IOError:
> - raise _os.error
> + except OSError:
> + raise OSError
To me, the original two lines should have been deleted rather than
replaced with a pair that seem equivalent to 'pass'. Am I missing some
subtlety or is the above an artifact of two search and replaces?
> f.close()
That aside, this patch and previous changes convince me that the new
exceptions are a definite improvement.
Terry
More information about the Python-checkins
mailing list