<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_deque.py, branch v2.4b2</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_deque.py?h=v2.4b2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_deque.py?h=v2.4b2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2004-10-02T13:59:34Z</updated>
<entry>
<title>Upon insertion, if memory runs out, the deque was left in a corrupted state.</title>
<updated>2004-10-02T13:59:34Z</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2004-10-02T13:59:34Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=974d757af15c22049a2aaa8cecf1456cd79d6397'/>
<id>urn:sha1:974d757af15c22049a2aaa8cecf1456cd79d6397</id>
<content type='text'>
deque_item(): a performance bug: the linked list of blocks was followed
from the left in most cases, because the test (i &lt; (deque-&gt;len &gt;&gt; 1)) was
after "i %= BLOCKLEN".

deque_clear(): replaced a call to deque_len() with deque-&gt;len; not sure what
this call was here for, nor if all compilers under the sun would inline it.

deque_traverse(): I belive that it could be called by the GC when the deque
has leftblock==rightblock==NULL, because it is tracked before the first block
is allocated (though closely before).  Still, a C extension module subclassing
deque could provide its own tp_alloc that could trigger a GC collection after
the PyObject_GC_Track()...

deque_richcompare(): rewrote to cleanly check for end-of-iterations instead of
relying on deque.__iter__().next() to succeed exactly len(deque) times -- an
assumption which can break if deques are subclassed.  Added a test.

I wonder if the length should be explicitely bounded to INT_MAX, with
OverflowErrors, as in listobject.c.  On 64-bit machines, adding more than
INT_MAX in the deque will result in trouble.  (Note to anyone/me fixing
this: carefully check for overflows if len is close to INT_MAX in the
following functions: deque_rotate(), deque_item(), deque_ass_item())
</content>
</entry>
<entry>
<title>deque_traverse():  If the deque had one block, and its rightindex was</title>
<updated>2004-10-01T02:01:04Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-10-01T02:01:04Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=10c7e86454db59ece9d5ed028dd9d104ac766bdf'/>
<id>urn:sha1:10c7e86454db59ece9d5ed028dd9d104ac766bdf</id>
<content type='text'>
BLOCKLEN-1, this assert-failed in a debug build, or went wild with a
NULL pointer in a release build.  Reported on c.l.py by Stefan Behnel.
</content>
</entry>
<entry>
<title>Use floor division operator.</title>
<updated>2004-09-27T15:29:05Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-09-27T15:29:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ffdb8bb99c4017152a9dca70669f9d6b9831d454'/>
<id>urn:sha1:ffdb8bb99c4017152a9dca70669f9d6b9831d454</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove unnecessary line.</title>
<updated>2004-08-26T04:29:47Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-08-26T04:29:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=770acc2bb4798c2fc5e4052a8854c408735f4dd5'/>
<id>urn:sha1:770acc2bb4798c2fc5e4052a8854c408735f4dd5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>* balance the left/right search for getitem.</title>
<updated>2004-07-09T04:10:20Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-07-09T04:10:20Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a435c53e133546adb4a7d13a73f9b688bf1a6078'/>
<id>urn:sha1:a435c53e133546adb4a7d13a73f9b688bf1a6078</id>
<content type='text'>
* use assertions instead of tests after internal calls that can't fail.
* expand test coverage
</content>
</entry>
<entry>
<title>Make sets and deques weak referencable.</title>
<updated>2004-05-30T07:26:47Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-05-30T07:26:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=691d80532b0a0204e92de35ecba1472d87af6e94'/>
<id>urn:sha1:691d80532b0a0204e92de35ecba1472d87af6e94</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SF patch #872326:  Generator expression implementation</title>
<updated>2004-05-19T08:20:33Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-05-19T08:20:33Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=354433a59dd1701985ec8463ced25a967cade3c1'/>
<id>urn:sha1:354433a59dd1701985ec8463ced25a967cade3c1</id>
<content type='text'>
(Code contributed by Jiwon Seo.)

The documentation portion of the patch is being re-worked and will be
checked-in soon.  Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).

The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch.  Further additions are
welcome from everyone.  Please stress test this new feature as much as
possible before the alpha release.
</content>
</entry>
<entry>
<title>Make sure "del d[n]" is properly supported.  Was necessary because the</title>
<updated>2004-05-12T20:55:56Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-05-12T20:55:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0e371f2cb6178de7344c97e4a546703c4bba140e'/>
<id>urn:sha1:0e371f2cb6178de7344c97e4a546703c4bba140e</id>
<content type='text'>
same method that implements __setitem__ also implements __delitem__.
Also, there were several good use cases (removing items from a queue
and implementing Forth style stack ops).
</content>
</entry>
<entry>
<title>Temporarily disable doctest until genexps are in CVS</title>
<updated>2004-05-10T14:08:42Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-05-10T14:08:42Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=300fa1d3b27e43c58eb62abd5d85295eba2d81e7'/>
<id>urn:sha1:300fa1d3b27e43c58eb62abd5d85295eba2d81e7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add more examples.</title>
<updated>2004-05-09T01:15:01Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-05-09T01:15:01Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e7169eb9ede900c9b311725ba50757177be223bf'/>
<id>urn:sha1:e7169eb9ede900c9b311725ba50757177be223bf</id>
<content type='text'>
</content>
</entry>
</feed>
