<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_format.py, branch v2.1.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_format.py?h=v2.1.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_format.py?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-04-12T18:38:48Z</updated>
<entry>
<title>Bug 415514 reported that e.g.</title>
<updated>2001-04-12T18:38:48Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-04-12T18:38:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fff53250789c3879e5f63d4dde80d17e0b9c4dbb'/>
<id>urn:sha1:fff53250789c3879e5f63d4dde80d17e0b9c4dbb</id>
<content type='text'>
    "%#x" % 0
blew up, at heart because C sprintf supplies a base marker if and only if
the value is not 0.  I then fixed that, by tolerating C's inconsistency
when it does %#x, and taking away that *Python* produced 0x0 when
formatting 0L (the "long" flavor of 0) under %#x itself.  But after talking
with Guido, we agreed it would be better to supply 0x for the short int
case too, despite that it's inconsistent with C, because C is inconsistent
with itself and with Python's hex(0) (plus, while "%#x" % 0 didn't work
before, "%#x" % 0L *did*, and returned "0x0").  Similarly for %#X conversion.
</content>
</entry>
<entry>
<title>Fix for SF bug #415514: "%#x" % 0 caused assertion failure/abort.</title>
<updated>2001-04-12T00:35:51Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-04-12T00:35:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=711088d9b8c6898aad571fb251cb40a8b7d42f64'/>
<id>urn:sha1:711088d9b8c6898aad571fb251cb40a8b7d42f64</id>
<content type='text'>
http://sourceforge.net/tracker/index.php?func=detail&amp;aid=415514&amp;group_id=5470&amp;atid=105470
For short ints, Python defers to the platform C library to figure out what
%#x should do.  The code asserted that the platform C returned a string
beginning with "0x".  However, that's not true when-- and only when --the
*value* being formatted is 0.  Changed the code to live with C's inconsistency
here.  In the meantime, the problem does not arise if you format a long 0 (0L)
instead.  However, that's because the code *we* wrote to do %#x conversions on
longs produces a leading "0x" regardless of value.  That's probably wrong too:
we should drop leading "0x", for consistency with C, when (&amp; only when) formatting
0L.  So I changed the long formatting code to do that too.
</content>
</entry>
<entry>
<title>String method conversion.</title>
<updated>2001-02-09T11:46:37Z</updated>
<author>
<name>Eric S. Raymond</name>
<email>esr@thyrsus.com</email>
</author>
<published>2001-02-09T11:46:37Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d8c628bd59f70b5389c39fd9e6a15cb3e2d46f27'/>
<id>urn:sha1:d8c628bd59f70b5389c39fd9e6a15cb3e2d46f27</id>
<content type='text'>
(This one was trivial -- no actual string. references in it!)
</content>
</entry>
<entry>
<title>Whitespace normalization.  Leaving tokenize_tests.py alone for now.</title>
<updated>2001-01-18T02:22:22Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-01-18T02:22:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d2bf3b7ca6f702f54b8e81ea8d194fc116ac6791'/>
<id>urn:sha1:d2bf3b7ca6f702f54b8e81ea8d194fc116ac6791</id>
<content type='text'>
</content>
</entry>
<entry>
<title>a bold attempt to fix things broken by MAL's verify patch: import</title>
<updated>2001-01-17T21:51:36Z</updated>
<author>
<name>Fredrik Lundh</name>
<email>fredrik@pythonware.com</email>
</author>
<published>2001-01-17T21:51:36Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f785042433f0c43ed1ba2ba0388fc51d79bcf5c3'/>
<id>urn:sha1:f785042433f0c43ed1ba2ba0388fc51d79bcf5c3</id>
<content type='text'>
'verify' iff it's used by a test module...
</content>
</entry>
<entry>
<title>This patch removes all uses of "assert" in the regression test suite</title>
<updated>2001-01-17T19:11:13Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-01-17T19:11:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e'/>
<id>urn:sha1:3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e</id>
<content type='text'>
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.

Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
</content>
</entry>
<entry>
<title>Change expected message for ValueError, fixing bug #126400</title>
<updated>2000-12-20T00:55:46Z</updated>
<author>
<name>Andrew M. Kuchling</name>
<email>amk@amk.ca</email>
</author>
<published>2000-12-20T00:55:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c867f74a102a8df376ff55ca4dd9dc9055d16141'/>
<id>urn:sha1:c867f74a102a8df376ff55ca4dd9dc9055d16141</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add test case for error message raised by bad % format character</title>
<updated>2000-12-15T13:09:06Z</updated>
<author>
<name>Andrew M. Kuchling</name>
<email>amk@amk.ca</email>
</author>
<published>2000-12-15T13:09:06Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4d192b37ecaee5948d92eee0519de391c0b7b446'/>
<id>urn:sha1:4d192b37ecaee5948d92eee0519de391c0b7b446</id>
<content type='text'>
(Oh, look, it adds another little utility function for testing)
</content>
</entry>
<entry>
<title>Fox for SF bug #123859: %[duxXo] long formats inconsistent.</title>
<updated>2000-11-30T05:22:44Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2000-11-30T05:22:44Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a3a3a030af8579bdd0d3a8d293ee60a1ec8107dc'/>
<id>urn:sha1:a3a3a030af8579bdd0d3a8d293ee60a1ec8107dc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Derived from Martin's SF patch 110609:  support unbounded ints in %d,i,u,x,X,o formats.</title>
<updated>2000-09-21T05:43:11Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2000-09-21T05:43:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=38fd5b641366eedc74e4be3a0e4d2210f3bcdb5a'/>
<id>urn:sha1:38fd5b641366eedc74e4be3a0e4d2210f3bcdb5a</id>
<content type='text'>
Note a curious extension to the std C rules:  x, X and o formatting can never produce
a sign character in C, so the '+' and ' ' flags are meaningless for them.  But
unbounded ints *can* produce a sign character under these conversions (no fixed-
width bitstring is wide enough to hold all negative values in 2's-comp form).  So
these flags become meaningful in Python when formatting a Python long which is too
big to fit in a C long.  This required shuffling around existing code, which hacked
x and X conversions to death when both the '#' and '0' flags were specified:  the
hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or
'+' flags too, since signs were always meaningless before for x and X conversions.
Isomorphic shuffling was required in unicodeobject.c.
Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
</content>
</entry>
</feed>
