]> granicus.if.org Git - python/commit
SF bug 480215: softspace confused in nested print
authorTim Peters <tim.peters@gmail.com>
Sun, 24 Mar 2002 19:25:00 +0000 (19:25 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 24 Mar 2002 19:25:00 +0000 (19:25 +0000)
commit8e5fd53be00001cbfa9368bd64f67cdef5d46771
treef4182ff5d75144a6ddb1778ba23eb6beb64f1c9a
parentf3f87f743efc252a0f4fa62719a2f9cf52df3f85
SF bug 480215:  softspace confused in nested print
This fixes the symptom, but PRINT_ITEM has no way to know what (if
anything) PyFile_WriteObject() writes unless the object being printed
is a string.  When the object isn't a string, this fix retains the
guess that softspace should be set after PyFile_WriteObject().
We might want to say that it's the job of filelike-object write methods
to leave the file's softspace in the correct state.  That would probably
be better -- but everyone relies on PRINT_ITEM to guess for them now.
Lib/test/test_softspace.py [new file with mode: 0644]
Python/ceval.c