From d8d841f674f4d87a4f44a967c616cc2dcec0a162 Mon Sep 17 00:00:00 2001 From: Geoffrey Thomas Date: Mon, 12 Feb 2024 15:11:00 -0500 Subject: [PATCH] Standardize quote format in int.from_bytes/to_bytes docstring The motivation for this is that the unpaired backtick confuses Sphinx, and inheriting from int (e.g. through enum.IntEnum) is pretty common. See https://stackoverflow.com/q/77914856 for an example of the problem this causes. --- Objects/clinic/longobject.c.h | 4 ++-- Objects/longobject.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 4a3d71c6111af5..d9f4b9c3372b2f 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -267,7 +267,7 @@ PyDoc_STRVAR(int_to_bytes__doc__, " the most significant byte is at the beginning of the byte array. If\n" " byteorder is \'little\', the most significant byte is at the end of the\n" " byte array. To request the native byte order of the host system, use\n" -" `sys.byteorder\' as the byte order value. Default is to use \'big\'.\n" +" \'sys.byteorder\' as the byte order value. Default is to use \'big\'.\n" " signed\n" " Determines whether two\'s complement is used to represent the integer.\n" " If signed is False and a negative integer is given, an OverflowError\n" @@ -380,7 +380,7 @@ PyDoc_STRVAR(int_from_bytes__doc__, " the most significant byte is at the beginning of the byte array. If\n" " byteorder is \'little\', the most significant byte is at the end of the\n" " byte array. To request the native byte order of the host system, use\n" -" `sys.byteorder\' as the byte order value. Default is to use \'big\'.\n" +" \'sys.byteorder\' as the byte order value. Default is to use \'big\'.\n" " signed\n" " Indicates whether two\'s complement is used to represent the integer."); diff --git a/Objects/longobject.c b/Objects/longobject.c index e655ba19e8f1c1..f3c09fb11a2cc3 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -6026,7 +6026,7 @@ int.to_bytes the most significant byte is at the beginning of the byte array. If byteorder is 'little', the most significant byte is at the end of the byte array. To request the native byte order of the host system, use - `sys.byteorder' as the byte order value. Default is to use 'big'. + 'sys.byteorder' as the byte order value. Default is to use 'big'. * signed as is_signed: bool = False Determines whether two's complement is used to represent the integer. @@ -6090,7 +6090,7 @@ int.from_bytes the most significant byte is at the beginning of the byte array. If byteorder is 'little', the most significant byte is at the end of the byte array. To request the native byte order of the host system, use - `sys.byteorder' as the byte order value. Default is to use 'big'. + 'sys.byteorder' as the byte order value. Default is to use 'big'. * signed as is_signed: bool = False Indicates whether two's complement is used to represent the integer.