[New-bugs-announce] [issue42427] Use the errno attribute of OSError instead of args[0]

Serhiy Storchaka report at bugs.python.org
Sat Nov 21 12:27:58 EST 2020


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

Some code in the stdlib still uses e.args[0] to access errno of OSError instead of e.errno. The latter is more readable, and also it always success (although can return None), but args can be an empty tuple.

----------
components: Library (Lib)
messages: 381570
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use the errno attribute of OSError instead of args[0]
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42427>
_______________________________________


More information about the New-bugs-announce mailing list