diff --git a/Misc/NEWS.d/next/Library/2019-03-09-18-01-24.bpo-36251.zOp9l0.rst b/Misc/NEWS.d/next/Library/2019-03-09-18-01-24.bpo-36251.zOp9l0.rst new file mode 100644 index 00000000000000..5138b0a0cb8b01 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-03-09-18-01-24.bpo-36251.zOp9l0.rst @@ -0,0 +1,2 @@ +Fix format strings used for stderrprinter and re.Match reprs. Patch by +Stephan Hohe. diff --git a/Modules/_sre.c b/Modules/_sre.c index a97ce7790e393d..4d2bdcc209679d 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -2319,7 +2319,7 @@ match_repr(MatchObject *self) if (group0 == NULL) return NULL; result = PyUnicode_FromFormat( - "<%s object; span=(%d, %d), match=%.50R>", + "<%s object; span=(%zd, %zd), match=%.50R>", Py_TYPE(self)->tp_name, self->mark[0], self->mark[1], group0); Py_DECREF(group0); diff --git a/Objects/fileobject.c b/Objects/fileobject.c index ed4e12ba8a8dee..d886e96e0f9b78 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -407,7 +407,7 @@ stdprinter_fileno(PyStdPrinter_Object *self) static PyObject * stdprinter_repr(PyStdPrinter_Object *self) { - return PyUnicode_FromFormat("", + return PyUnicode_FromFormat("", self->fd, self); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy