Skip to content

Commit d49abc9

Browse files
committed
Update code examples in docs
1 parent 0a69992 commit d49abc9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Doc/library/sys.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ always available. Unless explicitly noted otherwise, all variables are read-only
3030
.. code-block:: python
3131
3232
>>> import sys
33-
>>> getattr(sys, 'abiflags', '')
34-
DeprecationWarning: sys.abiflags will be set to a meaningful value on all platforms ...
33+
>>> getattr(sys, 'abiflags', None)
34+
<python-input-1>:1: DeprecationWarning: sys.abiflags will be set to a meaningful value on all platforms ...
35+
>>> hasattr(sys, 'abiflags')
36+
<python-input-2>:1: DeprecationWarning: sys.abiflags will be set to a meaningful value on all platforms ...
37+
False
3538
3639
Due to historical reasons, :data:`sys.abiflags` is not covered by
3740
:pep:`3149` on Windows. Now we have multiple builds, such as the

0 commit comments

Comments
 (0)