Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upoptimization: str(x) -> PyObject_Str(x) #3279
Comments
|
Yes, they are equivalent. The optimisation for the 1-argument case can follow this example: cython/Cython/Compiler/Optimize.py Line 2320 in 5578a9e Note that this needs to behave "as expected" for the three language levels 2, 3str and 3, but I think that should be ok. IIRC, |
|
Implemented in #3478. |
AFAICT they are equivalent. Found a usage of PyObject_str here and it looks like the optimization isn't made in other places where we just do
str(x).I was happy to see that the usage of PyUnicode_Join was unnecessary.