split the getattr/setattr of softspace into two try blocks
cpython can be observed setting softspace on an object even if it doesn't start with it. the getattrInternal in softspace() throws an exception the first time through since the attribute isn't present. if we don't turn around and set it on the object, we throw every time we print, which causes a pretty large perf regression (from ~6 seconds to ~17 seconds.)
Showing
test/tests/softspace.py
0 → 100644
Please register or sign in to comment