summaryrefslogtreecommitdiff
path: root/Doc/library/warnings.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/warnings.rst')
-rw-r--r--Doc/library/warnings.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
index 8af19a282e..8a538adb9b 100644
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -54,6 +54,8 @@ There are a number of built-in exceptions that represent warning categories.
This categorization is useful to be able to filter out groups of warnings. The
following warnings category classes are currently defined:
+.. tabularcolumns:: |l|p{0.6\linewidth}|
+
+----------------------------------+-----------------------------------------------+
| Class | Description |
+==================================+===============================================+
@@ -87,7 +89,7 @@ following warnings category classes are currently defined:
| | Unicode. |
+----------------------------------+-----------------------------------------------+
| :exc:`BytesWarning` | Base category for warnings related to |
-| | :class:`bytes` and :class:`buffer`. |
+| | :class:`bytes` and :class:`bytearray`. |
+----------------------------------+-----------------------------------------------+
| :exc:`ResourceWarning` | Base category for warnings related to |
| | resource usage. |
@@ -339,8 +341,7 @@ Available Functions
Write a warning to a file. The default implementation calls
``formatwarning(message, category, filename, lineno, line)`` and writes the
resulting string to *file*, which defaults to ``sys.stderr``. You may replace
- this function with an alternative implementation by assigning to
- ``warnings.showwarning``.
+ this function with any callable by assigning to ``warnings.showwarning``.
*line* is a line of source code to be included in the warning
message; if *line* is not supplied, :func:`showwarning` will
try to read the line specified by *filename* and *lineno*.