| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -147,7 +147,7 @@ subtypes but not for instances of :class:`frozenset` or its subtypes. | |||
| 147 | 147 | ||
| 148 | 148 | Return ``1`` if found and removed, ``0`` if not found (no action taken), and ``-1`` if an | |
| 149 | 149 | error is encountered. Does not raise :exc:`KeyError` for missing keys. Raise a | |
| 150 | - :exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~set.discard` | ||
| 150 | + :exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~frozenset.discard` | ||
| 151 | 151 | method, this function does not automatically convert unhashable sets into | |
| 152 | 152 | temporary frozensets. Raise :exc:`SystemError` if *set* is not an | |
| 153 | 153 | instance of :class:`set` or its subtype. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -321,7 +321,7 @@ An interesting advantage of using the :c:member:`~PyTypeObject.tp_members` table | |||
| 321 | 321 | descriptors that are used at runtime is that any attribute defined this way can | |
| 322 | 322 | have an associated doc string simply by providing the text in the table. An | |
| 323 | 323 | application can use the introspection API to retrieve the descriptor from the | |
| 324 | - class object, and get the doc string using its :attr:`__doc__` attribute. | ||
| 324 | + class object, and get the doc string using its :attr:`!__doc__` attribute. | ||
| 325 | 325 | ||
| 326 | 326 | As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry with a :c:member:`~PyMethodDef.ml_name` value | |
| 327 | 327 | of ``NULL`` is required. | |
@@ -473,7 +473,7 @@ instance of your data type. Here is a simple example:: | |||
| 473 | 473 | return result; | |
| 474 | 474 | } | |
| 475 | 475 | ||
| 476 | - :c:type:`Py_hash_t` is a signed integer type with a platform-varying width. | ||
| 476 | + :c:type:`!Py_hash_t` is a signed integer type with a platform-varying width. | ||
| 477 | 477 | Returning ``-1`` from :c:member:`~PyTypeObject.tp_hash` indicates an error, | |
| 478 | 478 | which is why you should be careful to avoid returning it when hash computation | |
| 479 | 479 | is successful, as seen above. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -204,6 +204,10 @@ StreamReader | |||
| 204 | 204 | directly; use :func:`open_connection` and :func:`start_server` | |
| 205 | 205 | instead. | |
| 206 | 206 | ||
| 207 | + .. method:: feed_eof() | ||
| 208 | + | ||
| 209 | + Acknowledge the EOF. | ||
| 210 | + | ||
| 207 | 211 | .. coroutinemethod:: read(n=-1) | |
| 208 | 212 | ||
| 209 | 213 | Read up to *n* bytes from the stream. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,6 +58,15 @@ The following exception classes are defined in the :mod:`email.errors` module: | |||
| 58 | 58 | :class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g. | |
| 59 | 59 | :class:`~email.mime.image.MIMEImage`). | |
| 60 | 60 | ||
| 61 | + .. exception:: MessageDefect() | ||
| 62 | + | ||
| 63 | + This is the base class for all defects found when parsing email messages. | ||
| 64 | + It is derived from :exc:`ValueError`. | ||
| 65 | + | ||
| 66 | + .. exception:: HeaderDefect() | ||
| 67 | + | ||
| 68 | + This is the base class for all defects found when parsing email headers. | ||
| 69 | + It is derived from :exc:`MessageDefect`. | ||
| 61 | 70 | ||
| 62 | 71 | Here is the list of the defects that the :class:`~email.parser.FeedParser` | |
| 63 | 72 | can find while parsing messages. Note that the defects are added to the message | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -105,7 +105,7 @@ The module defines the following items: | |||
| 105 | 105 | should only be provided in compression mode. If omitted or ``None``, the | |
| 106 | 106 | current time is used. See the :attr:`mtime` attribute for more details. | |
| 107 | 107 | ||
| 108 | - Calling a :class:`GzipFile` object's :meth:`close` method does not close | ||
| 108 | + Calling a :class:`GzipFile` object's :meth:`!close` method does not close | ||
| 109 | 109 | *fileobj*, since you might wish to append more material after the compressed | |
| 110 | 110 | data. This also allows you to pass an :class:`io.BytesIO` object opened for | |
| 111 | 111 | writing as *fileobj*, and retrieve the resulting memory buffer using the | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,7 @@ for example, a package and its resources can be imported from a zip file using | |||
| 41 | 41 | ``get_resource_reader(fullname)`` method as specified by | |
| 42 | 42 | :class:`importlib.resources.abc.ResourceReader`. | |
| 43 | 43 | ||
| 44 | - .. data:: Package | ||
| 44 | + .. class:: Package | ||
| 45 | 45 | ||
| 46 | 46 | Whenever a function accepts a ``Package`` argument, you can pass in | |
| 47 | 47 | either a :class:`module object <types.ModuleType>` or a module name | |
@@ -58,7 +58,7 @@ for example, a package and its resources can be imported from a zip file using | |||
| 58 | 58 | containers (think subdirectories). | |
| 59 | 59 | ||
| 60 | 60 | *package* is either a name or a module object which conforms to the | |
| 61 | - :data:`Package` requirements. | ||
| 61 | + :class:`Package` requirements. | ||
| 62 | 62 | ||
| 63 | 63 | .. versionadded:: 3.9 | |
| 64 | 64 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,7 +73,7 @@ decompression bomb Safe Safe Safe | |||
| 73 | 73 | 1. Expat 2.4.1 and newer is not vulnerable to the "billion laughs" and | |
| 74 | 74 | "quadratic blowup" vulnerabilities. Items still listed as vulnerable due to | |
| 75 | 75 | potential reliance on system-provided libraries. Check | |
| 76 | - :const:`pyexpat.EXPAT_VERSION`. | ||
| 76 | + :const:`!pyexpat.EXPAT_VERSION`. | ||
| 77 | 77 | 2. :mod:`xml.etree.ElementTree` doesn't expand external entities and raises a | |
| 78 | 78 | :exc:`~xml.etree.ElementTree.ParseError` when an entity occurs. | |
| 79 | 79 | 3. :mod:`xml.dom.minidom` doesn't expand external entities and simply returns | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,14 +14,12 @@ Doc/c-api/memory.rst | |||
| 14 | 14 | Doc/c-api/memoryview.rst | |
| 15 | 15 | Doc/c-api/module.rst | |
| 16 | 16 | Doc/c-api/object.rst | |
| 17 | - Doc/c-api/set.rst | ||
| 18 | 17 | Doc/c-api/stable.rst | |
| 19 | 18 | Doc/c-api/structures.rst | |
| 20 | 19 | Doc/c-api/sys.rst | |
| 21 | 20 | Doc/c-api/type.rst | |
| 22 | 21 | Doc/c-api/typeobj.rst | |
| 23 | 22 | Doc/extending/extending.rst | |
| 24 | - Doc/extending/newtypes.rst | ||
| 25 | 23 | Doc/glossary.rst | |
| 26 | 24 | Doc/howto/descriptor.rst | |
| 27 | 25 | Doc/howto/enum.rst | |
@@ -33,7 +31,6 @@ Doc/library/abc.rst | |||
| 33 | 31 | Doc/library/ast.rst | |
| 34 | 32 | Doc/library/asyncio-extending.rst | |
| 35 | 33 | Doc/library/asyncio-policy.rst | |
| 36 | - Doc/library/asyncio-stream.rst | ||
| 37 | 34 | Doc/library/asyncio-subprocess.rst | |
| 38 | 35 | Doc/library/asyncio-task.rst | |
| 39 | 36 | Doc/library/bdb.rst | |
@@ -55,7 +52,6 @@ Doc/library/dis.rst | |||
| 55 | 52 | Doc/library/email.charset.rst | |
| 56 | 53 | Doc/library/email.compat32-message.rst | |
| 57 | 54 | Doc/library/email.errors.rst | |
| 58 | - Doc/library/email.headerregistry.rst | ||
| 59 | 55 | Doc/library/email.mime.rst | |
| 60 | 56 | Doc/library/email.parser.rst | |
| 61 | 57 | Doc/library/email.policy.rst | |
@@ -67,12 +63,10 @@ Doc/library/ftplib.rst | |||
| 67 | 63 | Doc/library/functions.rst | |
| 68 | 64 | Doc/library/functools.rst | |
| 69 | 65 | Doc/library/gettext.rst | |
| 70 | - Doc/library/gzip.rst | ||
| 71 | 66 | Doc/library/http.client.rst | |
| 72 | 67 | Doc/library/http.cookiejar.rst | |
| 73 | 68 | Doc/library/http.cookies.rst | |
| 74 | 69 | Doc/library/http.server.rst | |
| 75 | - Doc/library/importlib.resources.rst | ||
| 76 | 70 | Doc/library/importlib.rst | |
| 77 | 71 | Doc/library/inspect.rst | |
| 78 | 72 | Doc/library/locale.rst | |
@@ -126,7 +120,6 @@ Doc/library/wsgiref.rst | |||
| 126 | 120 | Doc/library/xml.dom.minidom.rst | |
| 127 | 121 | Doc/library/xml.dom.pulldom.rst | |
| 128 | 122 | Doc/library/xml.dom.rst | |
| 129 | - Doc/library/xml.rst | ||
| 130 | 123 | Doc/library/xml.sax.handler.rst | |
| 131 | 124 | Doc/library/xml.sax.reader.rst | |
| 132 | 125 | Doc/library/xml.sax.rst | |
| Back | FazBrowse Home | New Git URL |
0 commit comments