mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-71679: Share the repr implementation between bytes and bytearray (GH-138181)
This allows to use the smart quotes algorithm in the bytearray's repr.
This commit is contained in:
parent
cf9ef73121
commit
a1cf6e92b6
5 changed files with 30 additions and 93 deletions
|
|
@ -47,6 +47,9 @@ extern PyObject *_Py_bytes_endswith(const char *str, Py_ssize_t len,
|
|||
/* The maketrans() static method. */
|
||||
extern PyObject* _Py_bytes_maketrans(Py_buffer *frm, Py_buffer *to);
|
||||
|
||||
/* Helper for repr(bytes) and repr(bytearray). */
|
||||
extern PyObject *_Py_bytes_repr(const char *, Py_ssize_t, int, const char *);
|
||||
|
||||
/* Shared __doc__ strings. */
|
||||
extern const char _Py_isspace__doc__[];
|
||||
extern const char _Py_isalpha__doc__[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue