<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stutzbach Enterprises &#187; Python</title>
	<atom:link href="http://stutzbachenterprises.com/tag/python/feed" rel="self" type="application/rss+xml" />
	<link>http://stutzbachenterprises.com</link>
	<description>Software design, development, and optimization</description>
	<lastBuildDate>Thu, 30 Sep 2021 06:08:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>winreg_unicode 0.5.0</title>
		<link>http://stutzbachenterprises.com/winregunicode-050</link>
		<comments>http://stutzbachenterprises.com/winregunicode-050#comments</comments>
		<pubDate>Fri, 09 Jul 2010 16:10:32 +0000</pubDate>
		<dc:creator><![CDATA[Daniel Stutzbach]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[Unicode]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[winreg]]></category>

		<guid isPermaLink="false">http://stutzbachenterprises.com/?p=268</guid>
		<description><![CDATA[<p>The winreg_unicode package is a drop-in replacement for Python 2&#8217;s _winreg module. However, it returns unicode values where possible, similar to Python 3&#8217;s winreg module.</p> <p>To illustrate the need for the winreg_unicode package, suppose an application must query the registry to discover a filename and the registry contains the string &#34;međuresorna.txt&#34;. Python 2&#8217;s _winreg module [...]]]></description>
				<content:encoded><![CDATA[<p>The winreg_unicode package is a drop-in replacement for Python 2&#8217;s <a class="reference external" href="http://docs.python.org/library/_winreg.html">_winreg</a> module.  However, it returns unicode values where possible, similar to Python 3&#8217;s <a class="reference external" href="http://docs.python.org/py3k/library/winreg.html">winreg</a> module.</p>
<p>To illustrate the need for the winreg_unicode package, suppose an application must query the registry to discover a filename and the registry contains the string &quot;međuresorna.txt&quot;.  Python 2&#8217;s <a class="reference external" href="http://docs.python.org/library/_winreg.html">_winreg</a> module will return &quot;meduresorna.txt&quot; instead, which is not the actual name of the file.</p>
<p>The winreg_unicode package does not yet contain all of <a class="reference external" href="http://docs.python.org/library/_winreg.html">_winreg</a>&#8216;s functions.  In particular, functions that write to the registry are not yet included.  Code contributions are welcome.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Fstutzbachenterprises.com%2Fwinregunicode-050&amp;title=winreg_unicode%200.5.0" id="wpa2a_2"><img src="http://stutzbachenterprises.com/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://stutzbachenterprises.com/winregunicode-050/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>blist 1.1.1</title>
		<link>http://stutzbachenterprises.com/blist-111</link>
		<comments>http://stutzbachenterprises.com/blist-111#comments</comments>
		<pubDate>Sun, 31 Jan 2010 21:04:25 +0000</pubDate>
		<dc:creator><![CDATA[Daniel Stutzbach]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blist]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://stutzbachenterprises.com/?p=217</guid>
		<description><![CDATA[<p>blist 1.1.1 is now available: http://pypi.python.org/pypi/blist/</p> What is blist? <p>The blist is a drop-in replacement for the Python list the provides better performance when modifying large lists. Python&#8217;s built-in list is a dynamically-sized array; to insert or removal an item from the beginning or middle of the list, it has to move most of the [...]]]></description>
				<content:encoded><![CDATA[<p>blist 1.1.1 is now available: <a href="http://pypi.python.org/pypi/blist/">http://pypi.python.org/pypi/blist/</a></p>
<h3>What is blist?</h3>
<p>The blist is a drop-in replacement for the Python list the provides better performance when modifying large lists.  Python&#8217;s built-in list is a dynamically-sized array; to insert or removal an item from the beginning or middle of the list, it has to move most of the list in memory, i.e., O(n) operations.  The blist uses a flexible, hybrid array/tree structure and only needs to move a small portion of items in memory, specifically using O(log n) operations.</p>
<p>For small lists, the blist and the built-in list have virtually identical performance.</p>
<h3>What&#8217;s new?</h3>
<p>The blist package provides other data structures based on the blist:</p>
<ul class="simple">
<li>sortedlist</li>
<li>sortedset</li>
<li>weaksortedlist</li>
<li>weaksorteset</li>
<li>sorteddict</li>
<li>btuple</li>
</ul>
<p>These additional data structures are only available in Python 2.6 or higher, as they make use of Abstract Base Classes.</p>
<p>The sortedlist is a list that&#8217;s always sorted.  It&#8217;s iterable and indexable like a Python list, but to modify a sortedlist the same<br />
methods you would use on a Python set (add, discard, or remove).</p>
<pre class="doctest-block">
&gt;&gt;&gt; from blist import sortedlist
&gt;&gt;&gt; my_list = sortedlist([3,7,2,1])
&gt;&gt;&gt; my_list
sortedlist([1, 2, 3, 7])
&gt;&gt;&gt; my_list.add(5)
&gt;&gt;&gt; my_list[3]
5
&gt;&gt;&gt;
</pre>
<p>The sortedlist constructor takes an optional &quot;key&quot; argument, which may be used to change the sort order just like the sorted() function.</p>
<pre class="doctest-block">
&gt;&gt;&gt; from blist import sortedlist
&gt;&gt;&gt; my_list = sortedlist([3,7,2,1], key=lambda i: -i)
sortedlist([7, 3, 2, 1]
&gt;&gt;&gt;
</pre>
<p>The sortedset is a set that&#8217;s always sorted.  It&#8217;s iterable and indexable like a Python list, but modified like a set.  Essentially, it&#8217;s just like a sortedlist except that duplicates are ignored.</p>
<pre class="doctest-block">
&gt;&gt;&gt; from blist import sortedset
&gt;&gt;&gt; my_set = sortedset([3,7,2,2])
sortedset([2, 3, 7]
&gt;&gt;&gt;
</pre>
<p>The weaksortedlist and weaksortedset are weakref variations of the sortedlist and sortedset.</p>
<p>The sorteddict works just like a regular dict, except the keys are always sorted.  The sorteddict should not be confused with Python 2.7&#8217;s OrderedDict type, which remembers the insertion order of the keys.</p>
<pre class="doctest-block">
&gt;&gt;&gt; from blist import sorteddict
&gt;&gt;&gt; my_dict = sorteddict({1: 5, 6: 8, -5: 9})
&gt;&gt;&gt; my_dict.keys()
[-5, 1, 6]
&gt;&gt;&gt;
</pre>
<p>The btuple is a drop-in replacement for the built-in tuple.  Compared to the built-in tuple, the btuple offers the following advantages:</p>
<ul class="simple">
<li>Constructing a btuple from a blist takes O(1) time.</li>
<li>Taking a slice of a btuple takes O(n) time, where n is the size of the original tuple.  The size of the slice does not matter.</li>
</ul>
<pre class="doctest-block">
&gt;&gt;&gt; from blist import blist, btuple
&gt;&gt;&gt; x = blist([0])             # x is a blist with one element
&gt;&gt;&gt; x *= 2**29                 # x is a blist with &gt; 500 million elements
&gt;&gt;&gt; y = btuple(x)              # y is a btuple with &gt; 500 million elements
</pre>
<h2>Feedback</h2>
<p>We&#8217;re eager to hear about your experiences with the blist.  You can email me at <a href="mailto:daniel%40stutzbachenterprises.com" class="reference external">daniel<span>&#64;</span>stutzbachenterprises<span>&#46;</span>com</a>.  Alternately, bug reports and feature requests may be reported on our bug tracker at: <a href="http://github.com/DanielStutzbach/blist/issues" class="reference external">http://github.com/DanielStutzbach/blist/issues</a></p>
<h2>How we test</h2>
<p>In addition to the tests include in the source distribution, we perform the following to add extra rigor to our testing process:</p>
<blockquote>
<ol class="arabic simple">
<li>We use a &quot;fuzzer&quot;: a program that randomly generates list operations, performs them using both the blist and the built-in list, and compares the results.</li>
<li>We use a modified Python interpreter where we have replaced the array-based built-in list with the blist.  Then, we run all of the regular Python unit tests.</li>
</ol>
</blockquote>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Fstutzbachenterprises.com%2Fblist-111&amp;title=blist%201.1.1" id="wpa2a_4"><img src="http://stutzbachenterprises.com/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://stutzbachenterprises.com/blist-111/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>blist 1.0.2</title>
		<link>http://stutzbachenterprises.com/blist-102</link>
		<comments>http://stutzbachenterprises.com/blist-102#comments</comments>
		<pubDate>Mon, 26 Oct 2009 21:22:44 +0000</pubDate>
		<dc:creator><![CDATA[Daniel Stutzbach]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blist]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://beta.stutzbachenterprises.com/?p=176</guid>
		<description><![CDATA[<p>The blist is a type that looks, acts, and quacks like a Python list, but has better performance for modifying large lists. For small lists (fewer than 128 elements), blists and the built-in list have very similar performance.</p> <p>blist version 1.0.2 includes two important bug fixes:</p> Fixed a crash in the .index method, which was [...]]]></description>
				<content:encoded><![CDATA[<p>The blist is a type that looks, acts, and quacks like a Python list, but has better performance for modifying large lists. For small lists (fewer than 128 elements), blists and the built-in list have very similar performance.</p>
<p><a href="http://pypi.python.org/pypi/blist/">blist version 1.0.2</a> includes two important bug fixes:</p>
<ul>
<li>Fixed a crash in the .index method, which was not properly sanitizing the optional arguments.  Previously, passing values larger than the length of the list could cause a crash.</li>
<li>Fixed a possible crash when modifying the blist during iteration</li>
</ul>
<p>Other changes include:</p>
<ul>
<li>Changed int to Py_ssize_t in several places for better 64-bit hygiene</li>
<li>Removed some over-zealous assertion checks that were causing crashes in oddball (but legal!) cases in debug builds</li>
<li>Ported tests to run under Python 2.6 and Python 3.1 (but no longer Python 2.5)</li>
<li>Got rid of warnings on non-ix86 platforms</li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Fstutzbachenterprises.com%2Fblist-102&amp;title=blist%201.0.2" id="wpa2a_6"><img src="http://stutzbachenterprises.com/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://stutzbachenterprises.com/blist-102/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using apc (User agent is rejected)
Database Caching 6/15 queries in 0.009 seconds using apc
Object Caching 529/539 objects using disk

 Served from: stutzbachenterprises.com @ 2026-04-25 21:08:37 by W3 Total Cache -->