[docs] [issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

Martin Panter report at bugs.python.org
Thu Jun 11 10:08:06 CEST 2015


Martin Panter added the comment:

Good point Serhiy about returning subclasses. I’ll see about making that more explicit if I can’t find it already documented somewhere.

Regarding the number of arguments, I resisted documenting what happens to extra arguments since the behaviour has changed over time, and it doesn’t seem that it would be very useful. IMO it would be better to say passing extra arguments is not supported. But if others disagree, I can have a go at documenting the existing and/or past behaviour.

Python 3.3.3 under Wine:
>>> OSError(None, "Not found", "file", 3).args 
(2, 'Not found', 'file', 3)
>>> OSError(ENOENT, "Not found", "file", None).args
(2, 'Not found', 'file', None)

Python 3.6.0a0 under Linux:
>>> OSError(ENOENT, "Not found", "file", None).args
(2, 'Not found')

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23391>
_______________________________________


More information about the docs mailing list