chiark / gitweb /
documentation/python: adapt to changes in Python 3.12 builtins docs.
authorVladimír Vondruš <mosra@centrum.cz>
Fri, 13 Sep 2024 21:14:52 +0000 (23:14 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 14 Sep 2024 00:46:33 +0000 (02:46 +0200)
documentation/python.py

index 0b1927f72f91a1ccd07cb9d3d812536a08c16afd..5aa328e16ec11f77dbc01b2d29e43847ea0373e4 100755 (executable)
@@ -329,6 +329,12 @@ if sys.version_info >= (3, 11):
         ('__getstate__', "Helper for pickle.")
     })
 
+# Python 3.12 changes the __format__ docstring
+if sys.version_info >= (3, 11):
+    _filtered_builtin_functions.update({
+        ('__format__', "Default object formatter.\n\nReturn str(self) if format_spec is empty. Raise TypeError otherwise.")
+    })
+
 _filtered_builtin_properties = set([
     # (if defined) is gone in https://github.com/python/cpython/issues/112266
     # which is backported all the way to 3.11