Closed
Description
Bug report
While working on covering PyObject_Print
, I noticed that I couldn't hit some lines with any test. Specifically, the part that checks the type of the representation of the object returned by PyObject_Str
or PyObject_Repr
:
Lines 280 to 308 in f4ead48
As pointed out by @encukou, both aforementioned functions already check and ensure that the return type is a Python string:
Lines 492 to 498 in f4ead48
Lines 433 to 439 in f4ead48
So it is possible to simplify the function by excluding the useless checks of types diffent from Python string.
Metadata
Metadata
Assignees
Labels
No labels