Fix that ``winerror`` is only present under Windows.
This commit is contained in:
parent
437825a070
commit
30b7174cc2
10
pep-3151.txt
10
pep-3151.txt
|
@ -270,11 +270,11 @@ term, the lesser popularity of OSError is not a problem.
|
||||||
Exception attributes
|
Exception attributes
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
Coalescing WindowsError would mean the ``winerror`` attribute would be
|
Since WindowsError is coalesced into OSError, the latter gains a ``winerror``
|
||||||
present on all platforms, just set to ``None`` if the platform
|
attribute under Windows. It is set to None under situations where it is not
|
||||||
isn't Windows. Indeed, ``errno``, ``filename`` and ``strerror`` can all
|
meaningful, as is already the case with the ``errno``, ``filename`` and
|
||||||
already be None, as is often the case when OSError is raised directly
|
``strerror`` attributes (for example when OSError is raised directly by
|
||||||
by Python code.
|
Python code).
|
||||||
|
|
||||||
Deprecation of names
|
Deprecation of names
|
||||||
--------------------
|
--------------------
|
||||||
|
|
Loading…
Reference in New Issue