Fix that ``winerror`` is only present under Windows.

This commit is contained in:
Antoine Pitrou 2011-08-29 18:38:34 +02:00
parent 437825a070
commit 30b7174cc2
1 changed files with 5 additions and 5 deletions

View File

@ -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
-------------------- --------------------