diff options
author | Georg Brandl <georg@python.org> | 2009-07-18 09:03:10 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-07-18 09:03:10 +0000 |
commit | 82b84f480af8aed89fbf076ca5e8856b9a7229c8 (patch) | |
tree | 2f1aad34a7a50d44d22a7400ed84c513dca569d5 | |
parent | e53f3b00579c87f5efbbe10b521537cba6979269 (diff) | |
download | cpython-82b84f480af8aed89fbf076ca5e8856b9a7229c8.tar.gz |
#6513: fix example code: warning categories are classes, not instances.
-rw-r--r-- | Doc/library/warnings.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst index d36955f637..8fa695274e 100644 --- a/Doc/library/warnings.rst +++ b/Doc/library/warnings.rst @@ -204,7 +204,7 @@ check:: fxn() # Verify some things assert len(w) == 1 - assert isinstance(w[-1].category, DeprecationWarning) + assert issubclass(w[-1].category, DeprecationWarning) assert "deprecated" in str(w[-1].message) One can also cause all warnings to be exceptions by using ``error`` instead of |