]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-37751: Update `codecs.register()` doc. (GH-25643)
authorInada Naoki <songofacandy@gmail.com>
Wed, 28 Apr 2021 00:37:02 +0000 (09:37 +0900)
committerGitHub <noreply@github.com>
Wed, 28 Apr 2021 00:37:02 +0000 (09:37 +0900)
Doc/library/codecs.rst

index b15d293e38f633b13c1bbdd246b3bf265a2e7eb2..0dcd88f9fd5b7fd1fdec8b9eb0c99a7c5b696213 100644 (file)
@@ -159,9 +159,13 @@ function:
 .. function:: register(search_function)
 
    Register a codec search function. Search functions are expected to take one
-   argument, being the encoding name in all lower case letters, and return a
-   :class:`CodecInfo` object. In case a search function cannot find
-   a given encoding, it should return ``None``.
+   argument, being the encoding name in all lower case letters with hyphens
+   and spaces converted to underscores, and return a :class:`CodecInfo` object.
+   In case a search function cannot find a given encoding, it should return
+   ``None``.
+
+   .. versionchanged:: 3.9
+      Hyphens and spaces are converted to underscore.
 
 
 .. function:: unregister(search_function)