[Python-checkins] CVS: python/dist/src/Objects stringobject.c

Guido van Rossum guido@cnri.reston.va.us
Mon, 7 Jun 1999 11:12:33 -0400 (EDT)

Update of /projects/cvsroot/python/dist/src/Objects
In directory eric:/projects/python/develop/guido/src/Objects

Modified Files:
Log Message:
Fix bug discovered by John W. Shipman -- when the width of a format
specifier came from an int expression instead of a constant in the
format, a negative width was truncated to zero instead of taken to
mean the same as that negative constant plugged into the format.  E.g.
"(%*s)" % (-5, "foo") yielded "(foo)" while "(%-5s)" yields "(foo  )".
Now both yield the latter -- like sprintf() in C.