Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix formatting of literal in docstring of int.from_bytes and int.to_bytes #117847

Merged
merged 3 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Objects/clinic/longobject.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Objects/longobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -6291,7 +6291,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'.
jenshnielsen marked this conversation as resolved.
Show resolved Hide resolved
*
signed as is_signed: bool = False
Determines whether two's complement is used to represent the integer.
Expand All @@ -6304,7 +6304,7 @@ Return an array of bytes representing an integer.
static PyObject *
int_to_bytes_impl(PyObject *self, Py_ssize_t length, PyObject *byteorder,
int is_signed)
/*[clinic end generated code: output=89c801df114050a3 input=d42ecfb545039d71]*/
/*[clinic end generated code: output=89c801df114050a3 input=4d7913fefed31ca7]*/
{
int little_endian;
PyObject *bytes;
Expand Down Expand Up @@ -6355,7 +6355,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.
Expand All @@ -6366,7 +6366,7 @@ Return the integer represented by the given array of bytes.
static PyObject *
int_from_bytes_impl(PyTypeObject *type, PyObject *bytes_obj,
PyObject *byteorder, int is_signed)
/*[clinic end generated code: output=efc5d68e31f9314f input=33326dccdd655553]*/
/*[clinic end generated code: output=efc5d68e31f9314f input=116f52524870b1eb]*/
{
int little_endian;
PyObject *long_obj, *bytes;
Expand Down
Loading