ÿØÿà JFIF ÿþ >CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
ÿÛ C
Server IP : 172.67.171.101 / Your IP : 216.73.216.123 Web Server : Apache System : Linux server1.morocco-tours.com 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 User : zagoradraa ( 1005) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/python-docs-2.7.5/html/library/ |
Upload File : |
| Current File : /usr/share/doc/python-docs-2.7.5/html/library/collections.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>8.3. collections — High-performance container datatypes — Python 2.7.5 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2.7.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/sidebar.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Python 2.7.5 documentation"
href="../_static/opensearch.xml"/>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="copyright" title="Copyright" href="../copyright.html" />
<link rel="top" title="Python 2.7.5 documentation" href="../index.html" />
<link rel="up" title="8. Data Types" href="datatypes.html" />
<link rel="next" title="8.4. heapq — Heap queue algorithm" href="heapq.html" />
<link rel="prev" title="8.2. calendar — General calendar-related functions" href="calendar.html" />
<link rel="shortcut icon" type="image/png" href="../_static/py.png" />
<script type="text/javascript" src="../_static/copybutton.js"></script>
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="heapq.html" title="8.4. heapq — Heap queue algorithm"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="calendar.html" title="8.2. calendar — General calendar-related functions"
accesskey="P">previous</a> |</li>
<li><img src="../_static/py.png" alt=""
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="http://www.python.org/">Python</a> »</li>
<li>
<a href="../index.html">Python 2.7.5 documentation</a> »
</li>
<li><a href="index.html" >The Python Standard Library</a> »</li>
<li><a href="datatypes.html" accesskey="U">8. Data Types</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-collections">
<span id="collections-high-performance-container-datatypes"></span><h1>8.3. <a class="reference internal" href="#module-collections" title="collections: High-performance datatypes"><tt class="xref py py-mod docutils literal"><span class="pre">collections</span></tt></a> — High-performance container datatypes<a class="headerlink" href="#module-collections" title="Permalink to this headline">¶</a></h1>
<p class="versionadded">
<span class="versionmodified">New in version 2.4.</span></p>
<p><strong>Source code:</strong> <a class="reference external" href="http://hg.python.org/cpython/file/2.7/Lib/collections.py">Lib/collections.py</a> and <a class="reference external" href="http://hg.python.org/cpython/file/2.7/Lib/_abcoll.py">Lib/_abcoll.py</a></p>
<hr class="docutils" />
<p>This module implements specialized container datatypes providing alternatives to
Python’s general purpose built-in containers, <a class="reference internal" href="stdtypes.html#dict" title="dict"><tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></a>, <a class="reference internal" href="functions.html#list" title="list"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt></a>,
<a class="reference internal" href="stdtypes.html#set" title="set"><tt class="xref py py-class docutils literal"><span class="pre">set</span></tt></a>, and <a class="reference internal" href="functions.html#tuple" title="tuple"><tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt></a>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="18%" />
<col width="59%" />
<col width="23%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#collections.namedtuple" title="collections.namedtuple"><tt class="xref py py-func docutils literal"><span class="pre">namedtuple()</span></tt></a></td>
<td>factory function for creating tuple subclasses with named fields</td>
<td><p class="first last versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#collections.deque" title="collections.deque"><tt class="xref py py-class docutils literal"><span class="pre">deque</span></tt></a></td>
<td>list-like container with fast appends and pops on either end</td>
<td><p class="first last versionadded">
<span class="versionmodified">New in version 2.4.</span></p>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a></td>
<td>dict subclass for counting hashable objects</td>
<td><p class="first last versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#collections.OrderedDict" title="collections.OrderedDict"><tt class="xref py py-class docutils literal"><span class="pre">OrderedDict</span></tt></a></td>
<td>dict subclass that remembers the order entries were added</td>
<td><p class="first last versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.defaultdict" title="collections.defaultdict"><tt class="xref py py-class docutils literal"><span class="pre">defaultdict</span></tt></a></td>
<td>dict subclass that calls a factory function to supply missing values</td>
<td><p class="first last versionadded">
<span class="versionmodified">New in version 2.5.</span></p>
</td>
</tr>
</tbody>
</table>
<p>In addition to the concrete container classes, the collections module provides
<a class="reference internal" href="#collections-abstract-base-classes"><em>abstract base classes</em></a> that can be
used to test whether a class provides a particular interface, for example,
whether it is hashable or a mapping.</p>
<div class="section" id="counter-objects">
<h2>8.3.1. <a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a> objects<a class="headerlink" href="#counter-objects" title="Permalink to this headline">¶</a></h2>
<p>A counter tool is provided to support convenient and rapid tallies.
For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="c"># Tally occurrences of words in a list</span>
<span class="gp">>>> </span><span class="n">cnt</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">()</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">word</span> <span class="ow">in</span> <span class="p">[</span><span class="s">'red'</span><span class="p">,</span> <span class="s">'blue'</span><span class="p">,</span> <span class="s">'red'</span><span class="p">,</span> <span class="s">'green'</span><span class="p">,</span> <span class="s">'blue'</span><span class="p">,</span> <span class="s">'blue'</span><span class="p">]:</span>
<span class="gp">... </span> <span class="n">cnt</span><span class="p">[</span><span class="n">word</span><span class="p">]</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="gp">>>> </span><span class="n">cnt</span>
<span class="go">Counter({'blue': 3, 'red': 2, 'green': 1})</span>
<span class="gp">>>> </span><span class="c"># Find the ten most common words in Hamlet</span>
<span class="gp">>>> </span><span class="kn">import</span> <span class="nn">re</span>
<span class="gp">>>> </span><span class="n">words</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="s">r'\w+'</span><span class="p">,</span> <span class="nb">open</span><span class="p">(</span><span class="s">'hamlet.txt'</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">lower</span><span class="p">())</span>
<span class="gp">>>> </span><span class="n">Counter</span><span class="p">(</span><span class="n">words</span><span class="p">)</span><span class="o">.</span><span class="n">most_common</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
<span class="go">[('the', 1143), ('and', 966), ('to', 762), ('of', 669), ('i', 631),</span>
<span class="go"> ('you', 554), ('a', 546), ('my', 514), ('hamlet', 471), ('in', 451)]</span>
</pre></div>
</div>
<dl class="class">
<dt id="collections.Counter">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Counter</tt><big>(</big><span class="optional">[</span><em>iterable-or-mapping</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#collections.Counter" title="Permalink to this definition">¶</a></dt>
<dd><p>A <a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a> is a <a class="reference internal" href="stdtypes.html#dict" title="dict"><tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></a> subclass for counting hashable objects.
It is an unordered collection where elements are stored as dictionary keys
and their counts are stored as dictionary values. Counts are allowed to be
any integer value including zero or negative counts. The <a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a>
class is similar to bags or multisets in other languages.</p>
<p>Elements are counted from an <em>iterable</em> or initialized from another
<em>mapping</em> (or counter):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">()</span> <span class="c"># a new, empty counter</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">(</span><span class="s">'gallahad'</span><span class="p">)</span> <span class="c"># a new counter from an iterable</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">({</span><span class="s">'red'</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> <span class="s">'blue'</span><span class="p">:</span> <span class="mi">2</span><span class="p">})</span> <span class="c"># a new counter from a mapping</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">(</span><span class="n">cats</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">dogs</span><span class="o">=</span><span class="mi">8</span><span class="p">)</span> <span class="c"># a new counter from keyword args</span>
</pre></div>
</div>
<p>Counter objects have a dictionary interface except that they return a zero
count for missing items instead of raising a <a class="reference internal" href="exceptions.html#exceptions.KeyError" title="exceptions.KeyError"><tt class="xref py py-exc docutils literal"><span class="pre">KeyError</span></tt></a>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">([</span><span class="s">'eggs'</span><span class="p">,</span> <span class="s">'ham'</span><span class="p">])</span>
<span class="gp">>>> </span><span class="n">c</span><span class="p">[</span><span class="s">'bacon'</span><span class="p">]</span> <span class="c"># count of a missing element is zero</span>
<span class="go">0</span>
</pre></div>
</div>
<p>Setting a count to zero does not remove an element from a counter.
Use <tt class="docutils literal"><span class="pre">del</span></tt> to remove it entirely:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">c</span><span class="p">[</span><span class="s">'sausage'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span> <span class="c"># counter entry with a zero count</span>
<span class="gp">>>> </span><span class="k">del</span> <span class="n">c</span><span class="p">[</span><span class="s">'sausage'</span><span class="p">]</span> <span class="c"># del actually removes the entry</span>
</pre></div>
</div>
<p class="versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
<p>Counter objects support three methods beyond those available for all
dictionaries:</p>
<dl class="method">
<dt id="collections.Counter.elements">
<tt class="descname">elements</tt><big>(</big><big>)</big><a class="headerlink" href="#collections.Counter.elements" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an iterator over elements repeating each as many times as its
count. Elements are returned in arbitrary order. If an element’s count
is less than one, <a class="reference internal" href="#collections.Counter.elements" title="collections.Counter.elements"><tt class="xref py py-meth docutils literal"><span class="pre">elements()</span></tt></a> will ignore it.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">b</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">c</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">d</span><span class="o">=-</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">>>> </span><span class="nb">list</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">elements</span><span class="p">())</span>
<span class="go">['a', 'a', 'a', 'a', 'b', 'b']</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="collections.Counter.most_common">
<tt class="descname">most_common</tt><big>(</big><span class="optional">[</span><em>n</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#collections.Counter.most_common" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of the <em>n</em> most common elements and their counts from the
most common to the least. If <em>n</em> is not specified, <a class="reference internal" href="#collections.Counter.most_common" title="collections.Counter.most_common"><tt class="xref py py-func docutils literal"><span class="pre">most_common()</span></tt></a>
returns <em>all</em> elements in the counter. Elements with equal counts are
ordered arbitrarily:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">Counter</span><span class="p">(</span><span class="s">'abracadabra'</span><span class="p">)</span><span class="o">.</span><span class="n">most_common</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="go">[('a', 5), ('r', 2), ('b', 2)]</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="collections.Counter.subtract">
<tt class="descname">subtract</tt><big>(</big><span class="optional">[</span><em>iterable-or-mapping</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#collections.Counter.subtract" title="Permalink to this definition">¶</a></dt>
<dd><p>Elements are subtracted from an <em>iterable</em> or from another <em>mapping</em>
(or counter). Like <a class="reference internal" href="stdtypes.html#dict.update" title="dict.update"><tt class="xref py py-meth docutils literal"><span class="pre">dict.update()</span></tt></a> but subtracts counts instead
of replacing them. Both inputs and outputs may be zero or negative.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">b</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">c</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">d</span><span class="o">=-</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">b</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">c</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">d</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span><span class="o">.</span><span class="n">subtract</span><span class="p">(</span><span class="n">d</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span>
<span class="go">Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6})</span>
</pre></div>
</div>
</dd></dl>
<p>The usual dictionary methods are available for <a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a> objects
except for two which work differently for counters.</p>
<dl class="method">
<dt id="collections.Counter.fromkeys">
<tt class="descname">fromkeys</tt><big>(</big><em>iterable</em><big>)</big><a class="headerlink" href="#collections.Counter.fromkeys" title="Permalink to this definition">¶</a></dt>
<dd><p>This class method is not implemented for <a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a> objects.</p>
</dd></dl>
<dl class="method">
<dt id="collections.Counter.update">
<tt class="descname">update</tt><big>(</big><span class="optional">[</span><em>iterable-or-mapping</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#collections.Counter.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Elements are counted from an <em>iterable</em> or added-in from another
<em>mapping</em> (or counter). Like <a class="reference internal" href="stdtypes.html#dict.update" title="dict.update"><tt class="xref py py-meth docutils literal"><span class="pre">dict.update()</span></tt></a> but adds counts
instead of replacing them. Also, the <em>iterable</em> is expected to be a
sequence of elements, not a sequence of <tt class="docutils literal"><span class="pre">(key,</span> <span class="pre">value)</span></tt> pairs.</p>
</dd></dl>
</dd></dl>
<p>Common patterns for working with <a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a> objects:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="nb">sum</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">values</span><span class="p">())</span> <span class="c"># total of all counts</span>
<span class="n">c</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span> <span class="c"># reset all counts</span>
<span class="nb">list</span><span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="c"># list unique elements</span>
<span class="nb">set</span><span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="c"># convert to a set</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="c"># convert to a regular dictionary</span>
<span class="n">c</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="c"># convert to a list of (elem, cnt) pairs</span>
<span class="n">Counter</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="n">list_of_pairs</span><span class="p">))</span> <span class="c"># convert from a list of (elem, cnt) pairs</span>
<span class="n">c</span><span class="o">.</span><span class="n">most_common</span><span class="p">()[:</span><span class="o">-</span><span class="n">n</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="c"># n least common elements</span>
<span class="n">c</span> <span class="o">+=</span> <span class="n">Counter</span><span class="p">()</span> <span class="c"># remove zero and negative counts</span>
</pre></div>
</div>
<p>Several mathematical operations are provided for combining <a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a>
objects to produce multisets (counters that have counts greater than zero).
Addition and subtraction combine counters by adding or subtracting the counts
of corresponding elements. Intersection and union return the minimum and
maximum of corresponding counts. Each operation can accept inputs with signed
counts, but the output will exclude results with counts of zero or less.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">b</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">b</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">+</span> <span class="n">d</span> <span class="c"># add two counters together: c[x] + d[x]</span>
<span class="go">Counter({'a': 4, 'b': 3})</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">-</span> <span class="n">d</span> <span class="c"># subtract (keeping only positive counts)</span>
<span class="go">Counter({'a': 2})</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">&</span> <span class="n">d</span> <span class="c"># intersection: min(c[x], d[x])</span>
<span class="go">Counter({'a': 1, 'b': 1})</span>
<span class="gp">>>> </span><span class="n">c</span> <span class="o">|</span> <span class="n">d</span> <span class="c"># union: max(c[x], d[x])</span>
<span class="go">Counter({'a': 3, 'b': 2})</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>Counters were primarily designed to work with positive integers to represent
running counts; however, care was taken to not unnecessarily preclude use
cases needing other types or negative values. To help with those use cases,
this section documents the minimum range and type restrictions.</p>
<ul class="last simple">
<li>The <a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a> class itself is a dictionary subclass with no
restrictions on its keys and values. The values are intended to be numbers
representing counts, but you <em>could</em> store anything in the value field.</li>
<li>The <tt class="xref py py-meth docutils literal"><span class="pre">most_common()</span></tt> method requires only that the values be orderable.</li>
<li>For in-place operations such as <tt class="docutils literal"><span class="pre">c[key]</span> <span class="pre">+=</span> <span class="pre">1</span></tt>, the value type need only
support addition and subtraction. So fractions, floats, and decimals would
work and negative values are supported. The same is also true for
<tt class="xref py py-meth docutils literal"><span class="pre">update()</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">subtract()</span></tt> which allow negative and zero values
for both inputs and outputs.</li>
<li>The multiset methods are designed only for use cases with positive values.
The inputs may be negative or zero, but only outputs with positive values
are created. There are no type restrictions, but the value type needs to
support addition, subtraction, and comparison.</li>
<li>The <tt class="xref py py-meth docutils literal"><span class="pre">elements()</span></tt> method requires integer counts. It ignores zero and
negative counts.</li>
</ul>
</div>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<ul class="last">
<li><p class="first"><a class="reference external" href="http://code.activestate.com/recipes/576611/">Counter class</a>
adapted for Python 2.5 and an early <a class="reference external" href="http://code.activestate.com/recipes/259174/">Bag recipe</a> for Python 2.4.</p>
</li>
<li><p class="first"><a class="reference external" href="http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html">Bag class</a>
in Smalltalk.</p>
</li>
<li><p class="first">Wikipedia entry for <a class="reference external" href="http://en.wikipedia.org/wiki/Multiset">Multisets</a>.</p>
</li>
<li><p class="first"><a class="reference external" href="http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm">C++ multisets</a>
tutorial with examples.</p>
</li>
<li><p class="first">For mathematical operations on multisets and their use cases, see
<em>Knuth, Donald. The Art of Computer Programming Volume II,
Section 4.6.3, Exercise 19</em>.</p>
</li>
<li><p class="first">To enumerate all distinct multisets of a given size over a given set of
elements, see <a class="reference internal" href="itertools.html#itertools.combinations_with_replacement" title="itertools.combinations_with_replacement"><tt class="xref py py-func docutils literal"><span class="pre">itertools.combinations_with_replacement()</span></tt></a>.</p>
<blockquote>
<div><p>map(Counter, combinations_with_replacement(‘ABC’, 2)) –> AA AB AC BB BC CC</p>
</div></blockquote>
</li>
</ul>
</div>
</div>
<div class="section" id="deque-objects">
<h2>8.3.2. <a class="reference internal" href="#collections.deque" title="collections.deque"><tt class="xref py py-class docutils literal"><span class="pre">deque</span></tt></a> objects<a class="headerlink" href="#deque-objects" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="collections.deque">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">deque</tt><big>(</big><span class="optional">[</span><em>iterable</em><span class="optional">[</span>, <em>maxlen</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#collections.deque" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a new deque object initialized left-to-right (using <a class="reference internal" href="#collections.deque.append" title="collections.deque.append"><tt class="xref py py-meth docutils literal"><span class="pre">append()</span></tt></a>) with
data from <em>iterable</em>. If <em>iterable</em> is not specified, the new deque is empty.</p>
<p>Deques are a generalization of stacks and queues (the name is pronounced “deck”
and is short for “double-ended queue”). Deques support thread-safe, memory
efficient appends and pops from either side of the deque with approximately the
same O(1) performance in either direction.</p>
<p>Though <a class="reference internal" href="functions.html#list" title="list"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt></a> objects support similar operations, they are optimized for
fast fixed-length operations and incur O(n) memory movement costs for
<tt class="docutils literal"><span class="pre">pop(0)</span></tt> and <tt class="docutils literal"><span class="pre">insert(0,</span> <span class="pre">v)</span></tt> operations which change both the size and
position of the underlying data representation.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.4.</span></p>
<p>If <em>maxlen</em> is not specified or is <em>None</em>, deques may grow to an
arbitrary length. Otherwise, the deque is bounded to the specified maximum
length. Once a bounded length deque is full, when new items are added, a
corresponding number of items are discarded from the opposite end. Bounded
length deques provide functionality similar to the <tt class="docutils literal"><span class="pre">tail</span></tt> filter in
Unix. They are also useful for tracking transactions and other pools of data
where only the most recent activity is of interest.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.6: </span>Added <em>maxlen</em> parameter.</p>
<p>Deque objects support the following methods:</p>
<dl class="method">
<dt id="collections.deque.append">
<tt class="descname">append</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#collections.deque.append" title="Permalink to this definition">¶</a></dt>
<dd><p>Add <em>x</em> to the right side of the deque.</p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.appendleft">
<tt class="descname">appendleft</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#collections.deque.appendleft" title="Permalink to this definition">¶</a></dt>
<dd><p>Add <em>x</em> to the left side of the deque.</p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.clear">
<tt class="descname">clear</tt><big>(</big><big>)</big><a class="headerlink" href="#collections.deque.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove all elements from the deque leaving it with length 0.</p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.count">
<tt class="descname">count</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#collections.deque.count" title="Permalink to this definition">¶</a></dt>
<dd><p>Count the number of deque elements equal to <em>x</em>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.extend">
<tt class="descname">extend</tt><big>(</big><em>iterable</em><big>)</big><a class="headerlink" href="#collections.deque.extend" title="Permalink to this definition">¶</a></dt>
<dd><p>Extend the right side of the deque by appending elements from the iterable
argument.</p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.extendleft">
<tt class="descname">extendleft</tt><big>(</big><em>iterable</em><big>)</big><a class="headerlink" href="#collections.deque.extendleft" title="Permalink to this definition">¶</a></dt>
<dd><p>Extend the left side of the deque by appending elements from <em>iterable</em>.
Note, the series of left appends results in reversing the order of
elements in the iterable argument.</p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.pop">
<tt class="descname">pop</tt><big>(</big><big>)</big><a class="headerlink" href="#collections.deque.pop" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove and return an element from the right side of the deque. If no
elements are present, raises an <a class="reference internal" href="exceptions.html#exceptions.IndexError" title="exceptions.IndexError"><tt class="xref py py-exc docutils literal"><span class="pre">IndexError</span></tt></a>.</p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.popleft">
<tt class="descname">popleft</tt><big>(</big><big>)</big><a class="headerlink" href="#collections.deque.popleft" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove and return an element from the left side of the deque. If no
elements are present, raises an <a class="reference internal" href="exceptions.html#exceptions.IndexError" title="exceptions.IndexError"><tt class="xref py py-exc docutils literal"><span class="pre">IndexError</span></tt></a>.</p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.remove">
<tt class="descname">remove</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#collections.deque.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>Removed the first occurrence of <em>value</em>. If not found, raises a
<a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.5.</span></p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.reverse">
<tt class="descname">reverse</tt><big>(</big><big>)</big><a class="headerlink" href="#collections.deque.reverse" title="Permalink to this definition">¶</a></dt>
<dd><p>Reverse the elements of the deque in-place and then return <tt class="docutils literal"><span class="pre">None</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
</dd></dl>
<dl class="method">
<dt id="collections.deque.rotate">
<tt class="descname">rotate</tt><big>(</big><em>n</em><big>)</big><a class="headerlink" href="#collections.deque.rotate" title="Permalink to this definition">¶</a></dt>
<dd><p>Rotate the deque <em>n</em> steps to the right. If <em>n</em> is negative, rotate to
the left. Rotating one step to the right is equivalent to:
<tt class="docutils literal"><span class="pre">d.appendleft(d.pop())</span></tt>.</p>
</dd></dl>
<p>Deque objects also provide one read-only attribute:</p>
<dl class="attribute">
<dt id="collections.deque.maxlen">
<tt class="descname">maxlen</tt><a class="headerlink" href="#collections.deque.maxlen" title="Permalink to this definition">¶</a></dt>
<dd><p>Maximum size of a deque or <em>None</em> if unbounded.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
</dd></dl>
</dd></dl>
<p>In addition to the above, deques support iteration, pickling, <tt class="docutils literal"><span class="pre">len(d)</span></tt>,
<tt class="docutils literal"><span class="pre">reversed(d)</span></tt>, <tt class="docutils literal"><span class="pre">copy.copy(d)</span></tt>, <tt class="docutils literal"><span class="pre">copy.deepcopy(d)</span></tt>, membership testing with
the <a class="reference internal" href="../reference/expressions.html#in"><tt class="xref std std-keyword docutils literal"><span class="pre">in</span></tt></a> operator, and subscript references such as <tt class="docutils literal"><span class="pre">d[-1]</span></tt>. Indexed
access is O(1) at both ends but slows to O(n) in the middle. For fast random
access, use lists instead.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">deque</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">deque</span><span class="p">(</span><span class="s">'ghi'</span><span class="p">)</span> <span class="c"># make a new deque with three items</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">elem</span> <span class="ow">in</span> <span class="n">d</span><span class="p">:</span> <span class="c"># iterate over the deque's elements</span>
<span class="gp">... </span> <span class="k">print</span> <span class="n">elem</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
<span class="go">G</span>
<span class="go">H</span>
<span class="go">I</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s">'j'</span><span class="p">)</span> <span class="c"># add a new entry to the right side</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">appendleft</span><span class="p">(</span><span class="s">'f'</span><span class="p">)</span> <span class="c"># add a new entry to the left side</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="c"># show the representation of the deque</span>
<span class="go">deque(['f', 'g', 'h', 'i', 'j'])</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="c"># return and remove the rightmost item</span>
<span class="go">'j'</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">popleft</span><span class="p">()</span> <span class="c"># return and remove the leftmost item</span>
<span class="go">'f'</span>
<span class="gp">>>> </span><span class="nb">list</span><span class="p">(</span><span class="n">d</span><span class="p">)</span> <span class="c"># list the contents of the deque</span>
<span class="go">['g', 'h', 'i']</span>
<span class="gp">>>> </span><span class="n">d</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="c"># peek at leftmost item</span>
<span class="go">'g'</span>
<span class="gp">>>> </span><span class="n">d</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="c"># peek at rightmost item</span>
<span class="go">'i'</span>
<span class="gp">>>> </span><span class="nb">list</span><span class="p">(</span><span class="nb">reversed</span><span class="p">(</span><span class="n">d</span><span class="p">))</span> <span class="c"># list the contents of a deque in reverse</span>
<span class="go">['i', 'h', 'g']</span>
<span class="gp">>>> </span><span class="s">'h'</span> <span class="ow">in</span> <span class="n">d</span> <span class="c"># search the deque</span>
<span class="go">True</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="s">'jkl'</span><span class="p">)</span> <span class="c"># add multiple elements at once</span>
<span class="gp">>>> </span><span class="n">d</span>
<span class="go">deque(['g', 'h', 'i', 'j', 'k', 'l'])</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">rotate</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="c"># right rotation</span>
<span class="gp">>>> </span><span class="n">d</span>
<span class="go">deque(['l', 'g', 'h', 'i', 'j', 'k'])</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">rotate</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span> <span class="c"># left rotation</span>
<span class="gp">>>> </span><span class="n">d</span>
<span class="go">deque(['g', 'h', 'i', 'j', 'k', 'l'])</span>
<span class="gp">>>> </span><span class="n">deque</span><span class="p">(</span><span class="nb">reversed</span><span class="p">(</span><span class="n">d</span><span class="p">))</span> <span class="c"># make a new deque in reverse order</span>
<span class="go">deque(['l', 'k', 'j', 'i', 'h', 'g'])</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span> <span class="c"># empty the deque</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span> <span class="c"># cannot pop from an empty deque</span>
<span class="gt">Traceback (most recent call last):</span>
File <span class="nb">"<pyshell#6>"</span>, line <span class="m">1</span>, in <span class="n">-toplevel-</span>
<span class="n">d</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span>
<span class="gr">IndexError</span>: <span class="n">pop from an empty deque</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">extendleft</span><span class="p">(</span><span class="s">'abc'</span><span class="p">)</span> <span class="c"># extendleft() reverses the input order</span>
<span class="gp">>>> </span><span class="n">d</span>
<span class="go">deque(['c', 'b', 'a'])</span>
</pre></div>
</div>
<div class="section" id="deque-recipes">
<h3>8.3.2.1. <a class="reference internal" href="#collections.deque" title="collections.deque"><tt class="xref py py-class docutils literal"><span class="pre">deque</span></tt></a> Recipes<a class="headerlink" href="#deque-recipes" title="Permalink to this headline">¶</a></h3>
<p>This section shows various approaches to working with deques.</p>
<p>Bounded length deques provide functionality similar to the <tt class="docutils literal"><span class="pre">tail</span></tt> filter
in Unix:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">tail</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">n</span><span class="o">=</span><span class="mi">10</span><span class="p">):</span>
<span class="s">'Return the last n lines of a file'</span>
<span class="k">return</span> <span class="n">deque</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">filename</span><span class="p">),</span> <span class="n">n</span><span class="p">)</span>
</pre></div>
</div>
<p>Another approach to using deques is to maintain a sequence of recently
added elements by appending to the right and popping to the left:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">moving_average</span><span class="p">(</span><span class="n">iterable</span><span class="p">,</span> <span class="n">n</span><span class="o">=</span><span class="mi">3</span><span class="p">):</span>
<span class="c"># moving_average([40, 30, 50, 46, 39, 44]) --> 40.0 42.0 45.0 43.0</span>
<span class="c"># http://en.wikipedia.org/wiki/Moving_average</span>
<span class="n">it</span> <span class="o">=</span> <span class="nb">iter</span><span class="p">(</span><span class="n">iterable</span><span class="p">)</span>
<span class="n">d</span> <span class="o">=</span> <span class="n">deque</span><span class="p">(</span><span class="n">itertools</span><span class="o">.</span><span class="n">islice</span><span class="p">(</span><span class="n">it</span><span class="p">,</span> <span class="n">n</span><span class="o">-</span><span class="mi">1</span><span class="p">))</span>
<span class="n">d</span><span class="o">.</span><span class="n">appendleft</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="n">s</span> <span class="o">=</span> <span class="nb">sum</span><span class="p">(</span><span class="n">d</span><span class="p">)</span>
<span class="k">for</span> <span class="n">elem</span> <span class="ow">in</span> <span class="n">it</span><span class="p">:</span>
<span class="n">s</span> <span class="o">+=</span> <span class="n">elem</span> <span class="o">-</span> <span class="n">d</span><span class="o">.</span><span class="n">popleft</span><span class="p">()</span>
<span class="n">d</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">elem</span><span class="p">)</span>
<span class="k">yield</span> <span class="n">s</span> <span class="o">/</span> <span class="nb">float</span><span class="p">(</span><span class="n">n</span><span class="p">)</span>
</pre></div>
</div>
<p>The <tt class="xref py py-meth docutils literal"><span class="pre">rotate()</span></tt> method provides a way to implement <a class="reference internal" href="#collections.deque" title="collections.deque"><tt class="xref py py-class docutils literal"><span class="pre">deque</span></tt></a> slicing and
deletion. For example, a pure Python implementation of <tt class="docutils literal"><span class="pre">del</span> <span class="pre">d[n]</span></tt> relies on
the <tt class="xref py py-meth docutils literal"><span class="pre">rotate()</span></tt> method to position elements to be popped:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">delete_nth</span><span class="p">(</span><span class="n">d</span><span class="p">,</span> <span class="n">n</span><span class="p">):</span>
<span class="n">d</span><span class="o">.</span><span class="n">rotate</span><span class="p">(</span><span class="o">-</span><span class="n">n</span><span class="p">)</span>
<span class="n">d</span><span class="o">.</span><span class="n">popleft</span><span class="p">()</span>
<span class="n">d</span><span class="o">.</span><span class="n">rotate</span><span class="p">(</span><span class="n">n</span><span class="p">)</span>
</pre></div>
</div>
<p>To implement <a class="reference internal" href="#collections.deque" title="collections.deque"><tt class="xref py py-class docutils literal"><span class="pre">deque</span></tt></a> slicing, use a similar approach applying
<tt class="xref py py-meth docutils literal"><span class="pre">rotate()</span></tt> to bring a target element to the left side of the deque. Remove
old entries with <tt class="xref py py-meth docutils literal"><span class="pre">popleft()</span></tt>, add new entries with <tt class="xref py py-meth docutils literal"><span class="pre">extend()</span></tt>, and then
reverse the rotation.
With minor variations on that approach, it is easy to implement Forth style
stack manipulations such as <tt class="docutils literal"><span class="pre">dup</span></tt>, <tt class="docutils literal"><span class="pre">drop</span></tt>, <tt class="docutils literal"><span class="pre">swap</span></tt>, <tt class="docutils literal"><span class="pre">over</span></tt>, <tt class="docutils literal"><span class="pre">pick</span></tt>,
<tt class="docutils literal"><span class="pre">rot</span></tt>, and <tt class="docutils literal"><span class="pre">roll</span></tt>.</p>
</div>
</div>
<div class="section" id="defaultdict-objects">
<h2>8.3.3. <a class="reference internal" href="#collections.defaultdict" title="collections.defaultdict"><tt class="xref py py-class docutils literal"><span class="pre">defaultdict</span></tt></a> objects<a class="headerlink" href="#defaultdict-objects" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="collections.defaultdict">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">defaultdict</tt><big>(</big><span class="optional">[</span><em>default_factory</em><span class="optional">[</span>, <em>...</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#collections.defaultdict" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a new dictionary-like object. <a class="reference internal" href="#collections.defaultdict" title="collections.defaultdict"><tt class="xref py py-class docutils literal"><span class="pre">defaultdict</span></tt></a> is a subclass of the
built-in <a class="reference internal" href="stdtypes.html#dict" title="dict"><tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></a> class. It overrides one method and adds one writable
instance variable. The remaining functionality is the same as for the
<a class="reference internal" href="stdtypes.html#dict" title="dict"><tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></a> class and is not documented here.</p>
<p>The first argument provides the initial value for the <a class="reference internal" href="#collections.defaultdict.default_factory" title="collections.defaultdict.default_factory"><tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt></a>
attribute; it defaults to <tt class="docutils literal"><span class="pre">None</span></tt>. All remaining arguments are treated the same
as if they were passed to the <a class="reference internal" href="stdtypes.html#dict" title="dict"><tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></a> constructor, including keyword
arguments.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.5.</span></p>
<p><a class="reference internal" href="#collections.defaultdict" title="collections.defaultdict"><tt class="xref py py-class docutils literal"><span class="pre">defaultdict</span></tt></a> objects support the following method in addition to the
standard <a class="reference internal" href="stdtypes.html#dict" title="dict"><tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></a> operations:</p>
<dl class="method">
<dt id="collections.defaultdict.__missing__">
<tt class="descname">__missing__</tt><big>(</big><em>key</em><big>)</big><a class="headerlink" href="#collections.defaultdict.__missing__" title="Permalink to this definition">¶</a></dt>
<dd><p>If the <a class="reference internal" href="#collections.defaultdict.default_factory" title="collections.defaultdict.default_factory"><tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt></a> attribute is <tt class="docutils literal"><span class="pre">None</span></tt>, this raises a
<a class="reference internal" href="exceptions.html#exceptions.KeyError" title="exceptions.KeyError"><tt class="xref py py-exc docutils literal"><span class="pre">KeyError</span></tt></a> exception with the <em>key</em> as argument.</p>
<p>If <a class="reference internal" href="#collections.defaultdict.default_factory" title="collections.defaultdict.default_factory"><tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt></a> is not <tt class="docutils literal"><span class="pre">None</span></tt>, it is called without arguments
to provide a default value for the given <em>key</em>, this value is inserted in
the dictionary for the <em>key</em>, and returned.</p>
<p>If calling <a class="reference internal" href="#collections.defaultdict.default_factory" title="collections.defaultdict.default_factory"><tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt></a> raises an exception this exception is
propagated unchanged.</p>
<p>This method is called by the <a class="reference internal" href="../reference/datamodel.html#object.__getitem__" title="object.__getitem__"><tt class="xref py py-meth docutils literal"><span class="pre">__getitem__()</span></tt></a> method of the
<a class="reference internal" href="stdtypes.html#dict" title="dict"><tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></a> class when the requested key is not found; whatever it
returns or raises is then returned or raised by <a class="reference internal" href="../reference/datamodel.html#object.__getitem__" title="object.__getitem__"><tt class="xref py py-meth docutils literal"><span class="pre">__getitem__()</span></tt></a>.</p>
<p>Note that <a class="reference internal" href="#collections.defaultdict.__missing__" title="collections.defaultdict.__missing__"><tt class="xref py py-meth docutils literal"><span class="pre">__missing__()</span></tt></a> is <em>not</em> called for any operations besides
<a class="reference internal" href="../reference/datamodel.html#object.__getitem__" title="object.__getitem__"><tt class="xref py py-meth docutils literal"><span class="pre">__getitem__()</span></tt></a>. This means that <tt class="xref py py-meth docutils literal"><span class="pre">get()</span></tt> will, like normal
dictionaries, return <tt class="docutils literal"><span class="pre">None</span></tt> as a default rather than using
<a class="reference internal" href="#collections.defaultdict.default_factory" title="collections.defaultdict.default_factory"><tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt></a>.</p>
</dd></dl>
<p><a class="reference internal" href="#collections.defaultdict" title="collections.defaultdict"><tt class="xref py py-class docutils literal"><span class="pre">defaultdict</span></tt></a> objects support the following instance variable:</p>
<dl class="attribute">
<dt id="collections.defaultdict.default_factory">
<tt class="descname">default_factory</tt><a class="headerlink" href="#collections.defaultdict.default_factory" title="Permalink to this definition">¶</a></dt>
<dd><p>This attribute is used by the <a class="reference internal" href="#collections.defaultdict.__missing__" title="collections.defaultdict.__missing__"><tt class="xref py py-meth docutils literal"><span class="pre">__missing__()</span></tt></a> method; it is
initialized from the first argument to the constructor, if present, or to
<tt class="docutils literal"><span class="pre">None</span></tt>, if absent.</p>
</dd></dl>
</dd></dl>
<div class="section" id="defaultdict-examples">
<h3>8.3.3.1. <a class="reference internal" href="#collections.defaultdict" title="collections.defaultdict"><tt class="xref py py-class docutils literal"><span class="pre">defaultdict</span></tt></a> Examples<a class="headerlink" href="#defaultdict-examples" title="Permalink to this headline">¶</a></h3>
<p>Using <a class="reference internal" href="functions.html#list" title="list"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt></a> as the <tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt>, it is easy to group a
sequence of key-value pairs into a dictionary of lists:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">s</span> <span class="o">=</span> <span class="p">[(</span><span class="s">'yellow'</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s">'blue'</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="s">'yellow'</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="s">'blue'</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="p">(</span><span class="s">'red'</span><span class="p">,</span> <span class="mi">1</span><span class="p">)]</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">defaultdict</span><span class="p">(</span><span class="nb">list</span><span class="p">)</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">s</span><span class="p">:</span>
<span class="gp">... </span> <span class="n">d</span><span class="p">[</span><span class="n">k</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>
<span class="gp">...</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
<span class="go">[('blue', [2, 4]), ('red', [1]), ('yellow', [1, 3])]</span>
</pre></div>
</div>
<p>When each key is encountered for the first time, it is not already in the
mapping; so an entry is automatically created using the <tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt>
function which returns an empty <a class="reference internal" href="functions.html#list" title="list"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt></a>. The <tt class="xref py py-meth docutils literal"><span class="pre">list.append()</span></tt>
operation then attaches the value to the new list. When keys are encountered
again, the look-up proceeds normally (returning the list for that key) and the
<tt class="xref py py-meth docutils literal"><span class="pre">list.append()</span></tt> operation adds another value to the list. This technique is
simpler and faster than an equivalent technique using <a class="reference internal" href="stdtypes.html#dict.setdefault" title="dict.setdefault"><tt class="xref py py-meth docutils literal"><span class="pre">dict.setdefault()</span></tt></a>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="p">{}</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">s</span><span class="p">:</span>
<span class="gp">... </span> <span class="n">d</span><span class="o">.</span><span class="n">setdefault</span><span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="p">[])</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>
<span class="gp">...</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
<span class="go">[('blue', [2, 4]), ('red', [1]), ('yellow', [1, 3])]</span>
</pre></div>
</div>
<p>Setting the <tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt> to <a class="reference internal" href="functions.html#int" title="int"><tt class="xref py py-class docutils literal"><span class="pre">int</span></tt></a> makes the
<a class="reference internal" href="#collections.defaultdict" title="collections.defaultdict"><tt class="xref py py-class docutils literal"><span class="pre">defaultdict</span></tt></a> useful for counting (like a bag or multiset in other
languages):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">s</span> <span class="o">=</span> <span class="s">'mississippi'</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">defaultdict</span><span class="p">(</span><span class="nb">int</span><span class="p">)</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">s</span><span class="p">:</span>
<span class="gp">... </span> <span class="n">d</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="gp">...</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
<span class="go">[('i', 4), ('p', 2), ('s', 4), ('m', 1)]</span>
</pre></div>
</div>
<p>When a letter is first encountered, it is missing from the mapping, so the
<tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt> function calls <a class="reference internal" href="functions.html#int" title="int"><tt class="xref py py-func docutils literal"><span class="pre">int()</span></tt></a> to supply a default count of
zero. The increment operation then builds up the count for each letter.</p>
<p>The function <a class="reference internal" href="functions.html#int" title="int"><tt class="xref py py-func docutils literal"><span class="pre">int()</span></tt></a> which always returns zero is just a special case of
constant functions. A faster and more flexible way to create constant functions
is to use <a class="reference internal" href="itertools.html#itertools.repeat" title="itertools.repeat"><tt class="xref py py-func docutils literal"><span class="pre">itertools.repeat()</span></tt></a> which can supply any constant value (not just
zero):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="k">def</span> <span class="nf">constant_factory</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
<span class="gp">... </span> <span class="k">return</span> <span class="n">itertools</span><span class="o">.</span><span class="n">repeat</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="o">.</span><span class="n">next</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">defaultdict</span><span class="p">(</span><span class="n">constant_factory</span><span class="p">(</span><span class="s">'<missing>'</span><span class="p">))</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">'John'</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">'ran'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="s">'</span><span class="si">%(name)s</span><span class="s"> </span><span class="si">%(action)s</span><span class="s"> to </span><span class="si">%(object)s</span><span class="s">'</span> <span class="o">%</span> <span class="n">d</span>
<span class="go">'John ran to <missing>'</span>
</pre></div>
</div>
<p>Setting the <tt class="xref py py-attr docutils literal"><span class="pre">default_factory</span></tt> to <a class="reference internal" href="stdtypes.html#set" title="set"><tt class="xref py py-class docutils literal"><span class="pre">set</span></tt></a> makes the
<a class="reference internal" href="#collections.defaultdict" title="collections.defaultdict"><tt class="xref py py-class docutils literal"><span class="pre">defaultdict</span></tt></a> useful for building a dictionary of sets:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">s</span> <span class="o">=</span> <span class="p">[(</span><span class="s">'red'</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s">'blue'</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="s">'red'</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="s">'blue'</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="p">(</span><span class="s">'red'</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s">'blue'</span><span class="p">,</span> <span class="mi">4</span><span class="p">)]</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">defaultdict</span><span class="p">(</span><span class="nb">set</span><span class="p">)</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">s</span><span class="p">:</span>
<span class="gp">... </span> <span class="n">d</span><span class="p">[</span><span class="n">k</span><span class="p">]</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>
<span class="gp">...</span>
<span class="gp">>>> </span><span class="n">d</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
<span class="go">[('blue', set([2, 4])), ('red', set([1, 3]))]</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="namedtuple-factory-function-for-tuples-with-named-fields">
<h2>8.3.4. <a class="reference internal" href="#collections.namedtuple" title="collections.namedtuple"><tt class="xref py py-func docutils literal"><span class="pre">namedtuple()</span></tt></a> Factory Function for Tuples with Named Fields<a class="headerlink" href="#namedtuple-factory-function-for-tuples-with-named-fields" title="Permalink to this headline">¶</a></h2>
<p>Named tuples assign meaning to each position in a tuple and allow for more readable,
self-documenting code. They can be used wherever regular tuples are used, and
they add the ability to access fields by name instead of position index.</p>
<dl class="function">
<dt id="collections.namedtuple">
<tt class="descclassname">collections.</tt><tt class="descname">namedtuple</tt><big>(</big><em>typename</em>, <em>field_names</em><span class="optional">[</span>, <em>verbose=False</em><span class="optional">]</span><span class="optional">[</span>, <em>rename=False</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#collections.namedtuple" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a new tuple subclass named <em>typename</em>. The new subclass is used to
create tuple-like objects that have fields accessible by attribute lookup as
well as being indexable and iterable. Instances of the subclass also have a
helpful docstring (with typename and field_names) and a helpful <a class="reference internal" href="../reference/datamodel.html#object.__repr__" title="object.__repr__"><tt class="xref py py-meth docutils literal"><span class="pre">__repr__()</span></tt></a>
method which lists the tuple contents in a <tt class="docutils literal"><span class="pre">name=value</span></tt> format.</p>
<p>The <em>field_names</em> are a sequence of strings such as <tt class="docutils literal"><span class="pre">['x',</span> <span class="pre">'y']</span></tt>.
Alternatively, <em>field_names</em> can be a single string with each fieldname
separated by whitespace and/or commas, for example <tt class="docutils literal"><span class="pre">'x</span> <span class="pre">y'</span></tt> or <tt class="docutils literal"><span class="pre">'x,</span> <span class="pre">y'</span></tt>.</p>
<p>Any valid Python identifier may be used for a fieldname except for names
starting with an underscore. Valid identifiers consist of letters, digits,
and underscores but do not start with a digit or underscore and cannot be
a <a class="reference internal" href="keyword.html#module-keyword" title="keyword: Test whether a string is a keyword in Python."><tt class="xref py py-mod docutils literal"><span class="pre">keyword</span></tt></a> such as <em>class</em>, <em>for</em>, <em>return</em>, <em>global</em>, <em>pass</em>, <em>print</em>,
or <em>raise</em>.</p>
<p>If <em>rename</em> is true, invalid fieldnames are automatically replaced
with positional names. For example, <tt class="docutils literal"><span class="pre">['abc',</span> <span class="pre">'def',</span> <span class="pre">'ghi',</span> <span class="pre">'abc']</span></tt> is
converted to <tt class="docutils literal"><span class="pre">['abc',</span> <span class="pre">'_1',</span> <span class="pre">'ghi',</span> <span class="pre">'_3']</span></tt>, eliminating the keyword
<tt class="docutils literal"><span class="pre">def</span></tt> and the duplicate fieldname <tt class="docutils literal"><span class="pre">abc</span></tt>.</p>
<p>If <em>verbose</em> is true, the class definition is printed just before being built.</p>
<p>Named tuple instances do not have per-instance dictionaries, so they are
lightweight and require no more memory than regular tuples.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.7: </span>added support for <em>rename</em>.</p>
</dd></dl>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">Point</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s">'Point'</span><span class="p">,</span> <span class="p">[</span><span class="s">'x'</span><span class="p">,</span> <span class="s">'y'</span><span class="p">],</span> <span class="n">verbose</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="go">class Point(tuple):</span>
<span class="go"> 'Point(x, y)'</span>
<span class="go"> __slots__ = ()</span>
<span class="go"> _fields = ('x', 'y')</span>
<span class="go"> def __new__(_cls, x, y):</span>
<span class="go"> 'Create a new instance of Point(x, y)'</span>
<span class="go"> return _tuple.__new__(_cls, (x, y))</span>
<span class="go"> @classmethod</span>
<span class="go"> def _make(cls, iterable, new=tuple.__new__, len=len):</span>
<span class="go"> 'Make a new Point object from a sequence or iterable'</span>
<span class="go"> result = new(cls, iterable)</span>
<span class="go"> if len(result) != 2:</span>
<span class="go"> raise TypeError('Expected 2 arguments, got %d' % len(result))</span>
<span class="go"> return result</span>
<span class="go"> def __repr__(self):</span>
<span class="go"> 'Return a nicely formatted representation string'</span>
<span class="go"> return 'Point(x=%r, y=%r)' % self</span>
<span class="go"> def _asdict(self):</span>
<span class="go"> 'Return a new OrderedDict which maps field names to their values'</span>
<span class="go"> return OrderedDict(zip(self._fields, self))</span>
<span class="go"> def _replace(_self, **kwds):</span>
<span class="go"> 'Return a new Point object replacing specified fields with new values'</span>
<span class="go"> result = _self._make(map(kwds.pop, ('x', 'y'), _self))</span>
<span class="go"> if kwds:</span>
<span class="go"> raise ValueError('Got unexpected field names: %r' % kwds.keys())</span>
<span class="go"> return result</span>
<span class="go"> def __getnewargs__(self):</span>
<span class="go"> 'Return self as a plain tuple. Used by copy and pickle.'</span>
<span class="go"> return tuple(self)</span>
<span class="go"> x = _property(_itemgetter(0), doc='Alias for field number 0')</span>
<span class="go"> y = _property(_itemgetter(1), doc='Alias for field number 1')</span>
<span class="gp">>>> </span><span class="n">p</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">11</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">22</span><span class="p">)</span> <span class="c"># instantiate with positional or keyword arguments</span>
<span class="gp">>>> </span><span class="n">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="n">p</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="c"># indexable like the plain tuple (11, 22)</span>
<span class="go">33</span>
<span class="gp">>>> </span><span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">p</span> <span class="c"># unpack like a regular tuple</span>
<span class="gp">>>> </span><span class="n">x</span><span class="p">,</span> <span class="n">y</span>
<span class="go">(11, 22)</span>
<span class="gp">>>> </span><span class="n">p</span><span class="o">.</span><span class="n">x</span> <span class="o">+</span> <span class="n">p</span><span class="o">.</span><span class="n">y</span> <span class="c"># fields also accessible by name</span>
<span class="go">33</span>
<span class="gp">>>> </span><span class="n">p</span> <span class="c"># readable __repr__ with a name=value style</span>
<span class="go">Point(x=11, y=22)</span>
</pre></div>
</div>
<p>Named tuples are especially useful for assigning field names to result tuples returned
by the <a class="reference internal" href="csv.html#module-csv" title="csv: Write and read tabular data to and from delimited files."><tt class="xref py py-mod docutils literal"><span class="pre">csv</span></tt></a> or <a class="reference internal" href="sqlite3.html#module-sqlite3" title="sqlite3: A DB-API 2.0 implementation using SQLite 3.x."><tt class="xref py py-mod docutils literal"><span class="pre">sqlite3</span></tt></a> modules:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">EmployeeRecord</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s">'EmployeeRecord'</span><span class="p">,</span> <span class="s">'name, age, title, department, paygrade'</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">csv</span>
<span class="k">for</span> <span class="n">emp</span> <span class="ow">in</span> <span class="nb">map</span><span class="p">(</span><span class="n">EmployeeRecord</span><span class="o">.</span><span class="n">_make</span><span class="p">,</span> <span class="n">csv</span><span class="o">.</span><span class="n">reader</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="s">"employees.csv"</span><span class="p">,</span> <span class="s">"rb"</span><span class="p">))):</span>
<span class="k">print</span> <span class="n">emp</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">emp</span><span class="o">.</span><span class="n">title</span>
<span class="kn">import</span> <span class="nn">sqlite3</span>
<span class="n">conn</span> <span class="o">=</span> <span class="n">sqlite3</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s">'/companydata'</span><span class="p">)</span>
<span class="n">cursor</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">cursor</span><span class="p">()</span>
<span class="n">cursor</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="s">'SELECT name, age, title, department, paygrade FROM employees'</span><span class="p">)</span>
<span class="k">for</span> <span class="n">emp</span> <span class="ow">in</span> <span class="nb">map</span><span class="p">(</span><span class="n">EmployeeRecord</span><span class="o">.</span><span class="n">_make</span><span class="p">,</span> <span class="n">cursor</span><span class="o">.</span><span class="n">fetchall</span><span class="p">()):</span>
<span class="k">print</span> <span class="n">emp</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">emp</span><span class="o">.</span><span class="n">title</span>
</pre></div>
</div>
<p>In addition to the methods inherited from tuples, named tuples support
three additional methods and one attribute. To prevent conflicts with
field names, the method and attribute names start with an underscore.</p>
<dl class="classmethod">
<dt id="collections.somenamedtuple._make">
<em class="property">classmethod </em><tt class="descclassname">somenamedtuple.</tt><tt class="descname">_make</tt><big>(</big><em>iterable</em><big>)</big><a class="headerlink" href="#collections.somenamedtuple._make" title="Permalink to this definition">¶</a></dt>
<dd><p>Class method that makes a new instance from an existing sequence or iterable.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">t</span> <span class="o">=</span> <span class="p">[</span><span class="mi">11</span><span class="p">,</span> <span class="mi">22</span><span class="p">]</span>
<span class="gp">>>> </span><span class="n">Point</span><span class="o">.</span><span class="n">_make</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
<span class="go">Point(x=11, y=22)</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="collections.somenamedtuple._asdict">
<tt class="descclassname">somenamedtuple.</tt><tt class="descname">_asdict</tt><big>(</big><big>)</big><a class="headerlink" href="#collections.somenamedtuple._asdict" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new <a class="reference internal" href="#collections.OrderedDict" title="collections.OrderedDict"><tt class="xref py py-class docutils literal"><span class="pre">OrderedDict</span></tt></a> which maps field names to their corresponding
values:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">p</span><span class="o">.</span><span class="n">_asdict</span><span class="p">()</span>
<span class="go">OrderedDict([('x', 11), ('y', 22)])</span>
</pre></div>
</div>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.7: </span>Returns an <a class="reference internal" href="#collections.OrderedDict" title="collections.OrderedDict"><tt class="xref py py-class docutils literal"><span class="pre">OrderedDict</span></tt></a> instead of a regular <a class="reference internal" href="stdtypes.html#dict" title="dict"><tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></a>.</p>
</dd></dl>
<dl class="method">
<dt id="collections.somenamedtuple._replace">
<tt class="descclassname">somenamedtuple.</tt><tt class="descname">_replace</tt><big>(</big><em>kwargs</em><big>)</big><a class="headerlink" href="#collections.somenamedtuple._replace" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new instance of the named tuple replacing specified fields with new
values:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">p</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">11</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">22</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">p</span><span class="o">.</span><span class="n">_replace</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">33</span><span class="p">)</span>
<span class="go">Point(x=33, y=22)</span>
<span class="gp">>>> </span><span class="k">for</span> <span class="n">partnum</span><span class="p">,</span> <span class="n">record</span> <span class="ow">in</span> <span class="n">inventory</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="go"> inventory[partnum] = record._replace(price=newprices[partnum], timestamp=time.now())</span>
</pre></div>
</div>
</dd></dl>
<dl class="attribute">
<dt id="collections.somenamedtuple._fields">
<tt class="descclassname">somenamedtuple.</tt><tt class="descname">_fields</tt><a class="headerlink" href="#collections.somenamedtuple._fields" title="Permalink to this definition">¶</a></dt>
<dd><p>Tuple of strings listing the field names. Useful for introspection
and for creating new named tuple types from existing named tuples.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">p</span><span class="o">.</span><span class="n">_fields</span> <span class="c"># view the field names</span>
<span class="go">('x', 'y')</span>
<span class="gp">>>> </span><span class="n">Color</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s">'Color'</span><span class="p">,</span> <span class="s">'red green blue'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">Pixel</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s">'Pixel'</span><span class="p">,</span> <span class="n">Point</span><span class="o">.</span><span class="n">_fields</span> <span class="o">+</span> <span class="n">Color</span><span class="o">.</span><span class="n">_fields</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">Pixel</span><span class="p">(</span><span class="mi">11</span><span class="p">,</span> <span class="mi">22</span><span class="p">,</span> <span class="mi">128</span><span class="p">,</span> <span class="mi">255</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="go">Pixel(x=11, y=22, red=128, green=255, blue=0)</span>
</pre></div>
</div>
</dd></dl>
<p>To retrieve a field whose name is stored in a string, use the <a class="reference internal" href="functions.html#getattr" title="getattr"><tt class="xref py py-func docutils literal"><span class="pre">getattr()</span></tt></a>
function:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="nb">getattr</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="s">'x'</span><span class="p">)</span>
<span class="go">11</span>
</pre></div>
</div>
<p>To convert a dictionary to a named tuple, use the double-star-operator
(as described in <a class="reference internal" href="../tutorial/controlflow.html#tut-unpacking-arguments"><em>Unpacking Argument Lists</em></a>):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="p">{</span><span class="s">'x'</span><span class="p">:</span> <span class="mi">11</span><span class="p">,</span> <span class="s">'y'</span><span class="p">:</span> <span class="mi">22</span><span class="p">}</span>
<span class="gp">>>> </span><span class="n">Point</span><span class="p">(</span><span class="o">**</span><span class="n">d</span><span class="p">)</span>
<span class="go">Point(x=11, y=22)</span>
</pre></div>
</div>
<p>Since a named tuple is a regular Python class, it is easy to add or change
functionality with a subclass. Here is how to add a calculated field and
a fixed-width print format:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="k">class</span> <span class="nc">Point</span><span class="p">(</span><span class="n">namedtuple</span><span class="p">(</span><span class="s">'Point'</span><span class="p">,</span> <span class="s">'x y'</span><span class="p">)):</span>
<span class="go"> __slots__ = ()</span>
<span class="go"> @property</span>
<span class="go"> def hypot(self):</span>
<span class="go"> return (self.x ** 2 + self.y ** 2) ** 0.5</span>
<span class="go"> def __str__(self):</span>
<span class="go"> return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, self.hypot)</span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">14</span><span class="p">,</span> <span class="mi">5</span><span class="o">/</span><span class="mf">7.</span><span class="p">):</span>
<span class="go"> print p</span>
<span class="go">Point: x= 3.000 y= 4.000 hypot= 5.000</span>
<span class="go">Point: x=14.000 y= 0.714 hypot=14.018</span>
</pre></div>
</div>
<p>The subclass shown above sets <tt class="docutils literal"><span class="pre">__slots__</span></tt> to an empty tuple. This helps
keep memory requirements low by preventing the creation of instance dictionaries.</p>
<p>Subclassing is not useful for adding new, stored fields. Instead, simply
create a new named tuple type from the <tt class="xref py py-attr docutils literal"><span class="pre">_fields</span></tt> attribute:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">Point3D</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s">'Point3D'</span><span class="p">,</span> <span class="n">Point</span><span class="o">.</span><span class="n">_fields</span> <span class="o">+</span> <span class="p">(</span><span class="s">'z'</span><span class="p">,))</span>
</pre></div>
</div>
<p>Default values can be implemented by using <tt class="xref py py-meth docutils literal"><span class="pre">_replace()</span></tt> to
customize a prototype instance:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">Account</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s">'Account'</span><span class="p">,</span> <span class="s">'owner balance transaction_count'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">default_account</span> <span class="o">=</span> <span class="n">Account</span><span class="p">(</span><span class="s">'<owner name>'</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">johns_account</span> <span class="o">=</span> <span class="n">default_account</span><span class="o">.</span><span class="n">_replace</span><span class="p">(</span><span class="n">owner</span><span class="o">=</span><span class="s">'John'</span><span class="p">)</span>
</pre></div>
</div>
<p>Enumerated constants can be implemented with named tuples, but it is simpler
and more efficient to use a simple class declaration:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">Status</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s">'Status'</span><span class="p">,</span> <span class="s">'open pending closed'</span><span class="p">)</span><span class="o">.</span><span class="n">_make</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">))</span>
<span class="gp">>>> </span><span class="n">Status</span><span class="o">.</span><span class="n">open</span><span class="p">,</span> <span class="n">Status</span><span class="o">.</span><span class="n">pending</span><span class="p">,</span> <span class="n">Status</span><span class="o">.</span><span class="n">closed</span>
<span class="go">(0, 1, 2)</span>
<span class="gp">>>> </span><span class="k">class</span> <span class="nc">Status</span><span class="p">:</span>
<span class="go"> open, pending, closed = range(3)</span>
</pre></div>
</div>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference external" href="http://code.activestate.com/recipes/500261/">Named tuple recipe</a>
adapted for Python 2.4.</p>
</div>
</div>
<div class="section" id="ordereddict-objects">
<h2>8.3.5. <a class="reference internal" href="#collections.OrderedDict" title="collections.OrderedDict"><tt class="xref py py-class docutils literal"><span class="pre">OrderedDict</span></tt></a> objects<a class="headerlink" href="#ordereddict-objects" title="Permalink to this headline">¶</a></h2>
<p>Ordered dictionaries are just like regular dictionaries but they remember the
order that items were inserted. When iterating over an ordered dictionary,
the items are returned in the order their keys were first added.</p>
<dl class="class">
<dt id="collections.OrderedDict">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">OrderedDict</tt><big>(</big><span class="optional">[</span><em>items</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#collections.OrderedDict" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an instance of a dict subclass, supporting the usual <a class="reference internal" href="stdtypes.html#dict" title="dict"><tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></a>
methods. An <em>OrderedDict</em> is a dict that remembers the order that keys
were first inserted. If a new entry overwrites an existing entry, the
original insertion position is left unchanged. Deleting an entry and
reinserting it will move it to the end.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
</dd></dl>
<dl class="method">
<dt id="collections.OrderedDict.popitem">
<tt class="descclassname">OrderedDict.</tt><tt class="descname">popitem</tt><big>(</big><em>last=True</em><big>)</big><a class="headerlink" href="#collections.OrderedDict.popitem" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#collections.OrderedDict.popitem" title="collections.OrderedDict.popitem"><tt class="xref py py-meth docutils literal"><span class="pre">popitem()</span></tt></a> method for ordered dictionaries returns and removes
a (key, value) pair. The pairs are returned in LIFO order if <em>last</em> is
true or FIFO order if false.</p>
</dd></dl>
<p>In addition to the usual mapping methods, ordered dictionaries also support
reverse iteration using <a class="reference internal" href="functions.html#reversed" title="reversed"><tt class="xref py py-func docutils literal"><span class="pre">reversed()</span></tt></a>.</p>
<p>Equality tests between <a class="reference internal" href="#collections.OrderedDict" title="collections.OrderedDict"><tt class="xref py py-class docutils literal"><span class="pre">OrderedDict</span></tt></a> objects are order-sensitive
and are implemented as <tt class="docutils literal"><span class="pre">list(od1.items())==list(od2.items())</span></tt>.
Equality tests between <a class="reference internal" href="#collections.OrderedDict" title="collections.OrderedDict"><tt class="xref py py-class docutils literal"><span class="pre">OrderedDict</span></tt></a> objects and other
<a class="reference internal" href="#collections.Mapping" title="collections.Mapping"><tt class="xref py py-class docutils literal"><span class="pre">Mapping</span></tt></a> objects are order-insensitive like regular dictionaries.
This allows <a class="reference internal" href="#collections.OrderedDict" title="collections.OrderedDict"><tt class="xref py py-class docutils literal"><span class="pre">OrderedDict</span></tt></a> objects to be substituted anywhere a
regular dictionary is used.</p>
<p>The <a class="reference internal" href="#collections.OrderedDict" title="collections.OrderedDict"><tt class="xref py py-class docutils literal"><span class="pre">OrderedDict</span></tt></a> constructor and <tt class="xref py py-meth docutils literal"><span class="pre">update()</span></tt> method both accept
keyword arguments, but their order is lost because Python’s function call
semantics pass-in keyword arguments using a regular unordered dictionary.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference external" href="http://code.activestate.com/recipes/576693/">Equivalent OrderedDict recipe</a>
that runs on Python 2.4 or later.</p>
</div>
<div class="section" id="ordereddict-examples-and-recipes">
<h3>8.3.5.1. <a class="reference internal" href="#collections.OrderedDict" title="collections.OrderedDict"><tt class="xref py py-class docutils literal"><span class="pre">OrderedDict</span></tt></a> Examples and Recipes<a class="headerlink" href="#ordereddict-examples-and-recipes" title="Permalink to this headline">¶</a></h3>
<p>Since an ordered dictionary remembers its insertion order, it can be used
in conjuction with sorting to make a sorted dictionary:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="c"># regular unsorted dictionary</span>
<span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="p">{</span><span class="s">'banana'</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> <span class="s">'apple'</span><span class="p">:</span><span class="mi">4</span><span class="p">,</span> <span class="s">'pear'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s">'orange'</span><span class="p">:</span> <span class="mi">2</span><span class="p">}</span>
<span class="gp">>>> </span><span class="c"># dictionary sorted by key</span>
<span class="gp">>>> </span><span class="n">OrderedDict</span><span class="p">(</span><span class="nb">sorted</span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">t</span><span class="p">:</span> <span class="n">t</span><span class="p">[</span><span class="mi">0</span><span class="p">]))</span>
<span class="go">OrderedDict([('apple', 4), ('banana', 3), ('orange', 2), ('pear', 1)])</span>
<span class="gp">>>> </span><span class="c"># dictionary sorted by value</span>
<span class="gp">>>> </span><span class="n">OrderedDict</span><span class="p">(</span><span class="nb">sorted</span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">t</span><span class="p">:</span> <span class="n">t</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
<span class="go">OrderedDict([('pear', 1), ('orange', 2), ('banana', 3), ('apple', 4)])</span>
<span class="gp">>>> </span><span class="c"># dictionary sorted by length of the key string</span>
<span class="gp">>>> </span><span class="n">OrderedDict</span><span class="p">(</span><span class="nb">sorted</span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">t</span><span class="p">:</span> <span class="nb">len</span><span class="p">(</span><span class="n">t</span><span class="p">[</span><span class="mi">0</span><span class="p">])))</span>
<span class="go">OrderedDict([('pear', 1), ('apple', 4), ('orange', 2), ('banana', 3)])</span>
</pre></div>
</div>
<p>The new sorted dictionaries maintain their sort order when entries
are deleted. But when new keys are added, the keys are appended
to the end and the sort is not maintained.</p>
<p>It is also straight-forward to create an ordered dictionary variant
that remembers the order the keys were <em>last</em> inserted.
If a new entry overwrites an existing entry, the
original insertion position is changed and moved to the end:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">LastUpdatedOrderedDict</span><span class="p">(</span><span class="n">OrderedDict</span><span class="p">):</span>
<span class="s">'Store items in the order the keys were last added'</span>
<span class="k">def</span> <span class="nf">__setitem__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="k">if</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">:</span>
<span class="k">del</span> <span class="bp">self</span><span class="p">[</span><span class="n">key</span><span class="p">]</span>
<span class="n">OrderedDict</span><span class="o">.</span><span class="n">__setitem__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
</pre></div>
</div>
<p>An ordered dictionary can be combined with the <a class="reference internal" href="#collections.Counter" title="collections.Counter"><tt class="xref py py-class docutils literal"><span class="pre">Counter</span></tt></a> class
so that the counter remembers the order elements are first encountered:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">OrderedCounter</span><span class="p">(</span><span class="n">Counter</span><span class="p">,</span> <span class="n">OrderedDict</span><span class="p">):</span>
<span class="s">'Counter that remembers the order elements are first encountered'</span>
<span class="k">def</span> <span class="nf">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="s">'</span><span class="si">%s</span><span class="s">(</span><span class="si">%r</span><span class="s">)'</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__class__</span><span class="o">.</span><span class="n">__name__</span><span class="p">,</span> <span class="n">OrderedDict</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span>
<span class="k">def</span> <span class="nf">__reduce__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__class__</span><span class="p">,</span> <span class="p">(</span><span class="n">OrderedDict</span><span class="p">(</span><span class="bp">self</span><span class="p">),)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="collections-abstract-base-classes">
<span id="id1"></span><h2>8.3.6. Collections Abstract Base Classes<a class="headerlink" href="#collections-abstract-base-classes" title="Permalink to this headline">¶</a></h2>
<p>The collections module offers the following <a class="reference internal" href="../glossary.html#term-abstract-base-class"><em class="xref std std-term">ABCs</em></a>:</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="18%" />
<col width="18%" />
<col width="43%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">ABC</th>
<th class="head">Inherits from</th>
<th class="head">Abstract Methods</th>
<th class="head">Mixin Methods</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="#collections.Container" title="collections.Container"><tt class="xref py py-class docutils literal"><span class="pre">Container</span></tt></a></td>
<td> </td>
<td><tt class="docutils literal"><span class="pre">__contains__</span></tt></td>
<td> </td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.Hashable" title="collections.Hashable"><tt class="xref py py-class docutils literal"><span class="pre">Hashable</span></tt></a></td>
<td> </td>
<td><tt class="docutils literal"><span class="pre">__hash__</span></tt></td>
<td> </td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#collections.Iterable" title="collections.Iterable"><tt class="xref py py-class docutils literal"><span class="pre">Iterable</span></tt></a></td>
<td> </td>
<td><tt class="docutils literal"><span class="pre">__iter__</span></tt></td>
<td> </td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.Iterator" title="collections.Iterator"><tt class="xref py py-class docutils literal"><span class="pre">Iterator</span></tt></a></td>
<td><a class="reference internal" href="#collections.Iterable" title="collections.Iterable"><tt class="xref py py-class docutils literal"><span class="pre">Iterable</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">next</span></tt></td>
<td><tt class="docutils literal"><span class="pre">__iter__</span></tt></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#collections.Sized" title="collections.Sized"><tt class="xref py py-class docutils literal"><span class="pre">Sized</span></tt></a></td>
<td> </td>
<td><tt class="docutils literal"><span class="pre">__len__</span></tt></td>
<td> </td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.Callable" title="collections.Callable"><tt class="xref py py-class docutils literal"><span class="pre">Callable</span></tt></a></td>
<td> </td>
<td><tt class="docutils literal"><span class="pre">__call__</span></tt></td>
<td> </td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#collections.Sequence" title="collections.Sequence"><tt class="xref py py-class docutils literal"><span class="pre">Sequence</span></tt></a></td>
<td><a class="reference internal" href="#collections.Sized" title="collections.Sized"><tt class="xref py py-class docutils literal"><span class="pre">Sized</span></tt></a>,
<a class="reference internal" href="#collections.Iterable" title="collections.Iterable"><tt class="xref py py-class docutils literal"><span class="pre">Iterable</span></tt></a>,
<a class="reference internal" href="#collections.Container" title="collections.Container"><tt class="xref py py-class docutils literal"><span class="pre">Container</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">__getitem__</span></tt>,
<tt class="docutils literal"><span class="pre">__len__</span></tt></td>
<td><tt class="docutils literal"><span class="pre">__contains__</span></tt>, <tt class="docutils literal"><span class="pre">__iter__</span></tt>, <tt class="docutils literal"><span class="pre">__reversed__</span></tt>,
<tt class="docutils literal"><span class="pre">index</span></tt>, and <tt class="docutils literal"><span class="pre">count</span></tt></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.MutableSequence" title="collections.MutableSequence"><tt class="xref py py-class docutils literal"><span class="pre">MutableSequence</span></tt></a></td>
<td><a class="reference internal" href="#collections.Sequence" title="collections.Sequence"><tt class="xref py py-class docutils literal"><span class="pre">Sequence</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">__getitem__</span></tt>,
<tt class="docutils literal"><span class="pre">__setitem__</span></tt>,
<tt class="docutils literal"><span class="pre">__delitem__</span></tt>,
<tt class="docutils literal"><span class="pre">__len__</span></tt>,
<tt class="docutils literal"><span class="pre">insert</span></tt></td>
<td>Inherited <a class="reference internal" href="#collections.Sequence" title="collections.Sequence"><tt class="xref py py-class docutils literal"><span class="pre">Sequence</span></tt></a> methods and
<tt class="docutils literal"><span class="pre">append</span></tt>, <tt class="docutils literal"><span class="pre">reverse</span></tt>, <tt class="docutils literal"><span class="pre">extend</span></tt>, <tt class="docutils literal"><span class="pre">pop</span></tt>,
<tt class="docutils literal"><span class="pre">remove</span></tt>, and <tt class="docutils literal"><span class="pre">__iadd__</span></tt></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-class docutils literal"><span class="pre">Set</span></tt></a></td>
<td><a class="reference internal" href="#collections.Sized" title="collections.Sized"><tt class="xref py py-class docutils literal"><span class="pre">Sized</span></tt></a>,
<a class="reference internal" href="#collections.Iterable" title="collections.Iterable"><tt class="xref py py-class docutils literal"><span class="pre">Iterable</span></tt></a>,
<a class="reference internal" href="#collections.Container" title="collections.Container"><tt class="xref py py-class docutils literal"><span class="pre">Container</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">__contains__</span></tt>,
<tt class="docutils literal"><span class="pre">__iter__</span></tt>,
<tt class="docutils literal"><span class="pre">__len__</span></tt></td>
<td><tt class="docutils literal"><span class="pre">__le__</span></tt>, <tt class="docutils literal"><span class="pre">__lt__</span></tt>, <tt class="docutils literal"><span class="pre">__eq__</span></tt>, <tt class="docutils literal"><span class="pre">__ne__</span></tt>,
<tt class="docutils literal"><span class="pre">__gt__</span></tt>, <tt class="docutils literal"><span class="pre">__ge__</span></tt>, <tt class="docutils literal"><span class="pre">__and__</span></tt>, <tt class="docutils literal"><span class="pre">__or__</span></tt>,
<tt class="docutils literal"><span class="pre">__sub__</span></tt>, <tt class="docutils literal"><span class="pre">__xor__</span></tt>, and <tt class="docutils literal"><span class="pre">isdisjoint</span></tt></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.MutableSet" title="collections.MutableSet"><tt class="xref py py-class docutils literal"><span class="pre">MutableSet</span></tt></a></td>
<td><a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-class docutils literal"><span class="pre">Set</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">__contains__</span></tt>,
<tt class="docutils literal"><span class="pre">__iter__</span></tt>,
<tt class="docutils literal"><span class="pre">__len__</span></tt>,
<tt class="docutils literal"><span class="pre">add</span></tt>,
<tt class="docutils literal"><span class="pre">discard</span></tt></td>
<td>Inherited <a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-class docutils literal"><span class="pre">Set</span></tt></a> methods and
<tt class="docutils literal"><span class="pre">clear</span></tt>, <tt class="docutils literal"><span class="pre">pop</span></tt>, <tt class="docutils literal"><span class="pre">remove</span></tt>, <tt class="docutils literal"><span class="pre">__ior__</span></tt>,
<tt class="docutils literal"><span class="pre">__iand__</span></tt>, <tt class="docutils literal"><span class="pre">__ixor__</span></tt>, and <tt class="docutils literal"><span class="pre">__isub__</span></tt></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#collections.Mapping" title="collections.Mapping"><tt class="xref py py-class docutils literal"><span class="pre">Mapping</span></tt></a></td>
<td><a class="reference internal" href="#collections.Sized" title="collections.Sized"><tt class="xref py py-class docutils literal"><span class="pre">Sized</span></tt></a>,
<a class="reference internal" href="#collections.Iterable" title="collections.Iterable"><tt class="xref py py-class docutils literal"><span class="pre">Iterable</span></tt></a>,
<a class="reference internal" href="#collections.Container" title="collections.Container"><tt class="xref py py-class docutils literal"><span class="pre">Container</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">__getitem__</span></tt>,
<tt class="docutils literal"><span class="pre">__iter__</span></tt>,
<tt class="docutils literal"><span class="pre">__len__</span></tt></td>
<td><tt class="docutils literal"><span class="pre">__contains__</span></tt>, <tt class="docutils literal"><span class="pre">keys</span></tt>, <tt class="docutils literal"><span class="pre">items</span></tt>, <tt class="docutils literal"><span class="pre">values</span></tt>,
<tt class="docutils literal"><span class="pre">get</span></tt>, <tt class="docutils literal"><span class="pre">__eq__</span></tt>, and <tt class="docutils literal"><span class="pre">__ne__</span></tt></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.MutableMapping" title="collections.MutableMapping"><tt class="xref py py-class docutils literal"><span class="pre">MutableMapping</span></tt></a></td>
<td><a class="reference internal" href="#collections.Mapping" title="collections.Mapping"><tt class="xref py py-class docutils literal"><span class="pre">Mapping</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">__getitem__</span></tt>,
<tt class="docutils literal"><span class="pre">__setitem__</span></tt>,
<tt class="docutils literal"><span class="pre">__delitem__</span></tt>,
<tt class="docutils literal"><span class="pre">__iter__</span></tt>,
<tt class="docutils literal"><span class="pre">__len__</span></tt></td>
<td>Inherited <a class="reference internal" href="#collections.Mapping" title="collections.Mapping"><tt class="xref py py-class docutils literal"><span class="pre">Mapping</span></tt></a> methods and
<tt class="docutils literal"><span class="pre">pop</span></tt>, <tt class="docutils literal"><span class="pre">popitem</span></tt>, <tt class="docutils literal"><span class="pre">clear</span></tt>, <tt class="docutils literal"><span class="pre">update</span></tt>,
and <tt class="docutils literal"><span class="pre">setdefault</span></tt></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#collections.MappingView" title="collections.MappingView"><tt class="xref py py-class docutils literal"><span class="pre">MappingView</span></tt></a></td>
<td><a class="reference internal" href="#collections.Sized" title="collections.Sized"><tt class="xref py py-class docutils literal"><span class="pre">Sized</span></tt></a></td>
<td> </td>
<td><tt class="docutils literal"><span class="pre">__len__</span></tt></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.ItemsView" title="collections.ItemsView"><tt class="xref py py-class docutils literal"><span class="pre">ItemsView</span></tt></a></td>
<td><a class="reference internal" href="#collections.MappingView" title="collections.MappingView"><tt class="xref py py-class docutils literal"><span class="pre">MappingView</span></tt></a>,
<a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-class docutils literal"><span class="pre">Set</span></tt></a></td>
<td> </td>
<td><tt class="docutils literal"><span class="pre">__contains__</span></tt>,
<tt class="docutils literal"><span class="pre">__iter__</span></tt></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#collections.KeysView" title="collections.KeysView"><tt class="xref py py-class docutils literal"><span class="pre">KeysView</span></tt></a></td>
<td><a class="reference internal" href="#collections.MappingView" title="collections.MappingView"><tt class="xref py py-class docutils literal"><span class="pre">MappingView</span></tt></a>,
<a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-class docutils literal"><span class="pre">Set</span></tt></a></td>
<td> </td>
<td><tt class="docutils literal"><span class="pre">__contains__</span></tt>,
<tt class="docutils literal"><span class="pre">__iter__</span></tt></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#collections.ValuesView" title="collections.ValuesView"><tt class="xref py py-class docutils literal"><span class="pre">ValuesView</span></tt></a></td>
<td><a class="reference internal" href="#collections.MappingView" title="collections.MappingView"><tt class="xref py py-class docutils literal"><span class="pre">MappingView</span></tt></a></td>
<td> </td>
<td><tt class="docutils literal"><span class="pre">__contains__</span></tt>, <tt class="docutils literal"><span class="pre">__iter__</span></tt></td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="collections.Container">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Container</tt><a class="headerlink" href="#collections.Container" title="Permalink to this definition">¶</a></dt>
<dt id="collections.Hashable">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Hashable</tt><a class="headerlink" href="#collections.Hashable" title="Permalink to this definition">¶</a></dt>
<dt id="collections.Sized">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Sized</tt><a class="headerlink" href="#collections.Sized" title="Permalink to this definition">¶</a></dt>
<dt id="collections.Callable">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Callable</tt><a class="headerlink" href="#collections.Callable" title="Permalink to this definition">¶</a></dt>
<dd><p>ABCs for classes that provide respectively the methods <a class="reference internal" href="../reference/datamodel.html#object.__contains__" title="object.__contains__"><tt class="xref py py-meth docutils literal"><span class="pre">__contains__()</span></tt></a>,
<a class="reference internal" href="../reference/datamodel.html#object.__hash__" title="object.__hash__"><tt class="xref py py-meth docutils literal"><span class="pre">__hash__()</span></tt></a>, <a class="reference internal" href="../reference/datamodel.html#object.__len__" title="object.__len__"><tt class="xref py py-meth docutils literal"><span class="pre">__len__()</span></tt></a>, and <a class="reference internal" href="../reference/datamodel.html#object.__call__" title="object.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">__call__()</span></tt></a>.</p>
</dd></dl>
<dl class="class">
<dt id="collections.Iterable">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Iterable</tt><a class="headerlink" href="#collections.Iterable" title="Permalink to this definition">¶</a></dt>
<dd><p>ABC for classes that provide the <a class="reference internal" href="../reference/datamodel.html#object.__iter__" title="object.__iter__"><tt class="xref py py-meth docutils literal"><span class="pre">__iter__()</span></tt></a> method.
See also the definition of <a class="reference internal" href="../glossary.html#term-iterable"><em class="xref std std-term">iterable</em></a>.</p>
</dd></dl>
<dl class="class">
<dt id="collections.Iterator">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Iterator</tt><a class="headerlink" href="#collections.Iterator" title="Permalink to this definition">¶</a></dt>
<dd><p>ABC for classes that provide the <a class="reference internal" href="../reference/datamodel.html#object.__iter__" title="object.__iter__"><tt class="xref py py-meth docutils literal"><span class="pre">__iter__()</span></tt></a> and <a class="reference internal" href="functions.html#next" title="next"><tt class="xref py py-meth docutils literal"><span class="pre">next()</span></tt></a> methods.
See also the definition of <a class="reference internal" href="../glossary.html#term-iterator"><em class="xref std std-term">iterator</em></a>.</p>
</dd></dl>
<dl class="class">
<dt id="collections.Sequence">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Sequence</tt><a class="headerlink" href="#collections.Sequence" title="Permalink to this definition">¶</a></dt>
<dt id="collections.MutableSequence">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">MutableSequence</tt><a class="headerlink" href="#collections.MutableSequence" title="Permalink to this definition">¶</a></dt>
<dd><p>ABCs for read-only and mutable <a class="reference internal" href="../glossary.html#term-sequence"><em class="xref std std-term">sequences</em></a>.</p>
</dd></dl>
<dl class="class">
<dt id="collections.Set">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Set</tt><a class="headerlink" href="#collections.Set" title="Permalink to this definition">¶</a></dt>
<dt id="collections.MutableSet">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">MutableSet</tt><a class="headerlink" href="#collections.MutableSet" title="Permalink to this definition">¶</a></dt>
<dd><p>ABCs for read-only and mutable sets.</p>
</dd></dl>
<dl class="class">
<dt id="collections.Mapping">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">Mapping</tt><a class="headerlink" href="#collections.Mapping" title="Permalink to this definition">¶</a></dt>
<dt id="collections.MutableMapping">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">MutableMapping</tt><a class="headerlink" href="#collections.MutableMapping" title="Permalink to this definition">¶</a></dt>
<dd><p>ABCs for read-only and mutable <a class="reference internal" href="../glossary.html#term-mapping"><em class="xref std std-term">mappings</em></a>.</p>
</dd></dl>
<dl class="class">
<dt id="collections.MappingView">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">MappingView</tt><a class="headerlink" href="#collections.MappingView" title="Permalink to this definition">¶</a></dt>
<dt id="collections.ItemsView">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">ItemsView</tt><a class="headerlink" href="#collections.ItemsView" title="Permalink to this definition">¶</a></dt>
<dt id="collections.KeysView">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">KeysView</tt><a class="headerlink" href="#collections.KeysView" title="Permalink to this definition">¶</a></dt>
<dt id="collections.ValuesView">
<em class="property">class </em><tt class="descclassname">collections.</tt><tt class="descname">ValuesView</tt><a class="headerlink" href="#collections.ValuesView" title="Permalink to this definition">¶</a></dt>
<dd><p>ABCs for mapping, items, keys, and values <a class="reference internal" href="../glossary.html#term-view"><em class="xref std std-term">views</em></a>.</p>
</dd></dl>
<p>These ABCs allow us to ask classes or instances if they provide
particular functionality, for example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">size</span> <span class="o">=</span> <span class="bp">None</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">myvar</span><span class="p">,</span> <span class="n">collections</span><span class="o">.</span><span class="n">Sized</span><span class="p">):</span>
<span class="n">size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">myvar</span><span class="p">)</span>
</pre></div>
</div>
<p>Several of the ABCs are also useful as mixins that make it easier to develop
classes supporting container APIs. For example, to write a class supporting
the full <a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-class docutils literal"><span class="pre">Set</span></tt></a> API, it only necessary to supply the three underlying
abstract methods: <a class="reference internal" href="../reference/datamodel.html#object.__contains__" title="object.__contains__"><tt class="xref py py-meth docutils literal"><span class="pre">__contains__()</span></tt></a>, <a class="reference internal" href="../reference/datamodel.html#object.__iter__" title="object.__iter__"><tt class="xref py py-meth docutils literal"><span class="pre">__iter__()</span></tt></a>, and <a class="reference internal" href="../reference/datamodel.html#object.__len__" title="object.__len__"><tt class="xref py py-meth docutils literal"><span class="pre">__len__()</span></tt></a>.
The ABC supplies the remaining methods such as <a class="reference internal" href="../reference/datamodel.html#object.__and__" title="object.__and__"><tt class="xref py py-meth docutils literal"><span class="pre">__and__()</span></tt></a> and
<tt class="xref py py-meth docutils literal"><span class="pre">isdisjoint()</span></tt></p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">ListBasedSet</span><span class="p">(</span><span class="n">collections</span><span class="o">.</span><span class="n">Set</span><span class="p">):</span>
<span class="sd">''' Alternate set implementation favoring space over speed</span>
<span class="sd"> and not requiring the set elements to be hashable. '''</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">iterable</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">elements</span> <span class="o">=</span> <span class="n">lst</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">iterable</span><span class="p">:</span>
<span class="k">if</span> <span class="n">value</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">lst</span><span class="p">:</span>
<span class="n">lst</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">__iter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="nb">iter</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">elements</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">__contains__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="k">return</span> <span class="n">value</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">elements</span>
<span class="k">def</span> <span class="nf">__len__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">elements</span><span class="p">)</span>
<span class="n">s1</span> <span class="o">=</span> <span class="n">ListBasedSet</span><span class="p">(</span><span class="s">'abcdef'</span><span class="p">)</span>
<span class="n">s2</span> <span class="o">=</span> <span class="n">ListBasedSet</span><span class="p">(</span><span class="s">'defghi'</span><span class="p">)</span>
<span class="n">overlap</span> <span class="o">=</span> <span class="n">s1</span> <span class="o">&</span> <span class="n">s2</span> <span class="c"># The __and__() method is supported automatically</span>
</pre></div>
</div>
<p>Notes on using <a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-class docutils literal"><span class="pre">Set</span></tt></a> and <a class="reference internal" href="#collections.MutableSet" title="collections.MutableSet"><tt class="xref py py-class docutils literal"><span class="pre">MutableSet</span></tt></a> as a mixin:</p>
<ol class="arabic simple">
<li>Since some set operations create new sets, the default mixin methods need
a way to create new instances from an iterable. The class constructor is
assumed to have a signature in the form <tt class="docutils literal"><span class="pre">ClassName(iterable)</span></tt>.
That assumption is factored-out to an internal classmethod called
<tt class="xref py py-meth docutils literal"><span class="pre">_from_iterable()</span></tt> which calls <tt class="docutils literal"><span class="pre">cls(iterable)</span></tt> to produce a new set.
If the <a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-class docutils literal"><span class="pre">Set</span></tt></a> mixin is being used in a class with a different
constructor signature, you will need to override <tt class="xref py py-meth docutils literal"><span class="pre">_from_iterable()</span></tt>
with a classmethod that can construct new instances from
an iterable argument.</li>
<li>To override the comparisons (presumably for speed, as the
semantics are fixed), redefine <a class="reference internal" href="../reference/datamodel.html#object.__le__" title="object.__le__"><tt class="xref py py-meth docutils literal"><span class="pre">__le__()</span></tt></a> and
then the other operations will automatically follow suit.</li>
<li>The <a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-class docutils literal"><span class="pre">Set</span></tt></a> mixin provides a <tt class="xref py py-meth docutils literal"><span class="pre">_hash()</span></tt> method to compute a hash value
for the set; however, <a class="reference internal" href="../reference/datamodel.html#object.__hash__" title="object.__hash__"><tt class="xref py py-meth docutils literal"><span class="pre">__hash__()</span></tt></a> is not defined because not all sets
are hashable or immutable. To add set hashabilty using mixins,
inherit from both <a class="reference internal" href="#collections.Set" title="collections.Set"><tt class="xref py py-meth docutils literal"><span class="pre">Set()</span></tt></a> and <a class="reference internal" href="#collections.Hashable" title="collections.Hashable"><tt class="xref py py-meth docutils literal"><span class="pre">Hashable()</span></tt></a>, then define
<tt class="docutils literal"><span class="pre">__hash__</span> <span class="pre">=</span> <span class="pre">Set._hash</span></tt>.</li>
</ol>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<ul class="last simple">
<li><a class="reference external" href="http://code.activestate.com/recipes/576694/">OrderedSet recipe</a> for an
example built on <a class="reference internal" href="#collections.MutableSet" title="collections.MutableSet"><tt class="xref py py-class docutils literal"><span class="pre">MutableSet</span></tt></a>.</li>
<li>For more about ABCs, see the <a class="reference internal" href="abc.html#module-abc" title="abc: Abstract base classes according to PEP 3119."><tt class="xref py py-mod docutils literal"><span class="pre">abc</span></tt></a> module and <span class="target" id="index-0"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-3119"><strong>PEP 3119</strong></a>.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">8.3. <tt class="docutils literal"><span class="pre">collections</span></tt> — High-performance container datatypes</a><ul>
<li><a class="reference internal" href="#counter-objects">8.3.1. <tt class="docutils literal"><span class="pre">Counter</span></tt> objects</a></li>
<li><a class="reference internal" href="#deque-objects">8.3.2. <tt class="docutils literal"><span class="pre">deque</span></tt> objects</a><ul>
<li><a class="reference internal" href="#deque-recipes">8.3.2.1. <tt class="docutils literal"><span class="pre">deque</span></tt> Recipes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#defaultdict-objects">8.3.3. <tt class="docutils literal"><span class="pre">defaultdict</span></tt> objects</a><ul>
<li><a class="reference internal" href="#defaultdict-examples">8.3.3.1. <tt class="docutils literal"><span class="pre">defaultdict</span></tt> Examples</a></li>
</ul>
</li>
<li><a class="reference internal" href="#namedtuple-factory-function-for-tuples-with-named-fields">8.3.4. <tt class="docutils literal"><span class="pre">namedtuple()</span></tt> Factory Function for Tuples with Named Fields</a></li>
<li><a class="reference internal" href="#ordereddict-objects">8.3.5. <tt class="docutils literal"><span class="pre">OrderedDict</span></tt> objects</a><ul>
<li><a class="reference internal" href="#ordereddict-examples-and-recipes">8.3.5.1. <tt class="docutils literal"><span class="pre">OrderedDict</span></tt> Examples and Recipes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#collections-abstract-base-classes">8.3.6. Collections Abstract Base Classes</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="calendar.html"
title="previous chapter">8.2. <tt class="docutils literal"><span class="pre">calendar</span></tt> — General calendar-related functions</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="heapq.html"
title="next chapter">8.4. <tt class="docutils literal"><span class="pre">heapq</span></tt> — Heap queue algorithm</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../bugs.html">Report a Bug</a></li>
<li><a href="../_sources/library/collections.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="heapq.html" title="8.4. heapq — Heap queue algorithm"
>next</a> |</li>
<li class="right" >
<a href="calendar.html" title="8.2. calendar — General calendar-related functions"
>previous</a> |</li>
<li><img src="../_static/py.png" alt=""
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="http://www.python.org/">Python</a> »</li>
<li>
<a href="../index.html">Python 2.7.5 documentation</a> »
</li>
<li><a href="index.html" >The Python Standard Library</a> »</li>
<li><a href="datatypes.html" >8. Data Types</a> »</li>
</ul>
</div>
<div class="footer">
© <a href="../copyright.html">Copyright</a> 1990-2019, Python Software Foundation.
<br />
The Python Software Foundation is a non-profit corporation.
<a href="http://www.python.org/psf/donations/">Please donate.</a>
<br />
Last updated on Jul 03, 2019.
<a href="../bugs.html">Found a bug</a>?
<br />
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>
| N4m3 |
5!z3 |
L45t M0d!f!3d |
0wn3r / Gr0up |
P3Rm!55!0n5 |
0pt!0n5 |
| .. |
-- |
October 23 2020 09:20:37 |
root / root |
0755 |
|
| | | | | |
| 2to3.html |
49.274 KB |
July 03 2019 16:47:49 |
root / root |
0644 |
|
| __builtin__.html |
10.261 KB |
July 03 2019 16:47:49 |
root / root |
0644 |
|
| __future__.html |
13.794 KB |
July 03 2019 16:47:49 |
root / root |
0644 |
|
| __main__.html |
7.055 KB |
July 03 2019 16:47:49 |
root / root |
0644 |
|
| _winreg.html |
59.208 KB |
July 03 2019 16:47:49 |
root / root |
0644 |
|
| abc.html |
23.898 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| aepack.html |
13.16 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| aetools.html |
14.914 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| aetypes.html |
18.882 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| aifc.html |
22.404 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| al.html |
17.341 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| allos.html |
33.725 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| anydbm.html |
16.33 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| archiving.html |
9.263 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| argparse.html |
237.615 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| array.html |
29.295 KB |
July 03 2019 16:47:50 |
root / root |
0644 |
|
| ast.html |
34.98 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| asynchat.html |
31.434 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| asyncore.html |
36.513 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| atexit.html |
16.803 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| audioop.html |
31.356 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| autogil.html |
8.186 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| base64.html |
19.669 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| basehttpserver.html |
34.039 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| bastion.html |
11.04 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| bdb.html |
36.682 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| binascii.html |
20.665 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| binhex.html |
10.577 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| bisect.html |
23.236 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| bsddb.html |
26.433 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| bz2.html |
26.082 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| calendar.html |
37.788 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| carbon.html |
48.944 KB |
July 03 2019 16:47:51 |
root / root |
0644 |
|
| cd.html |
27.96 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| cgi.html |
49.924 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| cgihttpserver.html |
13.099 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| cgitb.html |
11.411 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| chunk.html |
14.664 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| cmath.html |
25.632 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| cmd.html |
26.095 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| code.html |
24.577 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| codecs.html |
100.638 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| codeop.html |
14.841 KB |
July 03 2019 16:47:52 |
root / root |
0644 |
|
| collections.html |
133.964 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| colorpicker.html |
7.523 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| colorsys.html |
11.037 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| commands.html |
14.361 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| compileall.html |
16.827 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| compiler.html |
67.75 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| configparser.html |
62.131 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| constants.html |
12.834 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| contextlib.html |
19.388 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| cookie.html |
39.068 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| cookielib.html |
83.822 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| copy.html |
12.189 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| copy_reg.html |
13.765 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| crypt.html |
10.041 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| crypto.html |
7.591 KB |
July 03 2019 16:47:53 |
root / root |
0644 |
|
| csv.html |
67.371 KB |
July 03 2019 16:47:54 |
root / root |
0644 |
|
| ctypes.html |
238.781 KB |
July 03 2019 16:47:54 |
root / root |
0644 |
|
| curses.ascii.html |
22.288 KB |
July 03 2019 16:47:55 |
root / root |
0644 |
|
| curses.html |
146.633 KB |
July 03 2019 16:47:55 |
root / root |
0644 |
|
| curses.panel.html |
14.388 KB |
July 03 2019 16:47:55 |
root / root |
0644 |
|
| custominterp.html |
7.624 KB |
July 03 2019 16:47:55 |
root / root |
0644 |
|
| datatypes.html |
16.845 KB |
July 03 2019 16:47:55 |
root / root |
0644 |
|
| datetime.html |
226.595 KB |
July 03 2019 16:47:55 |
root / root |
0644 |
|
| dbhash.html |
15.482 KB |
July 03 2019 16:47:55 |
root / root |
0644 |
|
| dbm.html |
12.068 KB |
July 03 2019 16:47:55 |
root / root |
0644 |
|
| debug.html |
10.151 KB |
July 03 2019 16:47:55 |
root / root |
0644 |
|
| decimal.html |
194.439 KB |
July 03 2019 16:47:56 |
root / root |
0644 |
|
| development.html |
14.168 KB |
July 03 2019 16:47:56 |
root / root |
0644 |
|
| difflib.html |
84.829 KB |
July 03 2019 16:47:56 |
root / root |
0644 |
|
| dircache.html |
11.407 KB |
July 03 2019 16:47:56 |
root / root |
0644 |
|
| dis.html |
69.951 KB |
July 03 2019 16:47:56 |
root / root |
0644 |
|
| distutils.html |
8.055 KB |
July 03 2019 16:47:56 |
root / root |
0644 |
|
| dl.html |
16.327 KB |
July 03 2019 16:47:56 |
root / root |
0644 |
|
| doctest.html |
165.542 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| docxmlrpcserver.html |
16.432 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| dumbdbm.html |
14.021 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| dummy_thread.html |
9.432 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| dummy_threading.html |
8.368 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| easydialogs.html |
30.546 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email-examples.html |
45.654 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.charset.html |
26.804 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.encoders.html |
11.856 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.errors.html |
15.767 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.generator.html |
20.771 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.header.html |
26.922 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.html |
44.235 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.iterators.html |
11.521 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.message.html |
63.156 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.mime.html |
27.928 KB |
July 03 2019 16:47:57 |
root / root |
0644 |
|
| email.parser.html |
30.452 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| email.util.html |
24.461 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| errno.html |
37.994 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| exceptions.html |
56.126 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| fcntl.html |
22.673 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| filecmp.html |
22.299 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| fileformats.html |
9.136 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| fileinput.html |
24.278 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| filesys.html |
10.203 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| fl.html |
49.923 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| fm.html |
11.905 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| fnmatch.html |
14.577 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| formatter.html |
34.061 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| fpectl.html |
16.008 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| fpformat.html |
10.587 KB |
July 03 2019 16:47:58 |
root / root |
0644 |
|
| fractions.html |
22.608 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| framework.html |
33.345 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| frameworks.html |
7.143 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| ftplib.html |
43.989 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| functions.html |
183.145 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| functools.html |
27.169 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| future_builtins.html |
13.04 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| gc.html |
25.75 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| gdbm.html |
15.965 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| gensuitemodule.html |
11.513 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| getopt.html |
23.662 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| getpass.html |
10.652 KB |
July 03 2019 16:47:59 |
root / root |
0644 |
|
| gettext.html |
78.757 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| gl.html |
22.094 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| glob.html |
13.26 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| grp.html |
10.494 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| gzip.html |
18.985 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| hashlib.html |
18.198 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| heapq.html |
31.61 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| hmac.html |
10.464 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| hotshot.html |
18.649 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| htmllib.html |
25.315 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| htmlparser.html |
39.114 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| httplib.html |
62.95 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| i18n.html |
9.523 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| ic.html |
17.169 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| idle.html |
20.896 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| imageop.html |
14.765 KB |
July 03 2019 16:48:00 |
root / root |
0644 |
|
| imaplib.html |
51.986 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| imgfile.html |
11.712 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| imghdr.html |
11.297 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| imp.html |
34.344 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| importlib.html |
8.258 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| imputil.html |
31.808 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| index.html |
72.778 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| inspect.html |
50.705 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| internet.html |
24.872 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| intro.html |
8.935 KB |
July 03 2019 16:48:01 |
root / root |
0644 |
|
| io.html |
98.13 KB |
July 03 2019 16:48:02 |
root / root |
0644 |
|
| ipc.html |
13.405 KB |
July 03 2019 16:48:02 |
root / root |
0644 |
|
| itertools.html |
115.905 KB |
July 03 2019 16:48:02 |
root / root |
0644 |
|
| jpeg.html |
12.743 KB |
July 03 2019 16:48:02 |
root / root |
0644 |
|
| json.html |
67.037 KB |
July 03 2019 16:48:02 |
root / root |
0644 |
|
| keyword.html |
7.677 KB |
July 03 2019 16:48:02 |
root / root |
0644 |
|
| language.html |
11.027 KB |
July 03 2019 16:48:02 |
root / root |
0644 |
|
| linecache.html |
10.591 KB |
July 03 2019 16:48:02 |
root / root |
0644 |
|
| locale.html |
55.137 KB |
July 03 2019 16:48:02 |
root / root |
0644 |
|
| logging.config.html |
63.355 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| logging.handlers.html |
69.645 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| logging.html |
95.645 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| mac.html |
21.787 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| macos.html |
14.758 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| macosa.html |
12.959 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| macostools.html |
15.516 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| macpath.html |
7.764 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| mailbox.html |
156.753 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| mailcap.html |
13.215 KB |
July 03 2019 16:48:03 |
root / root |
0644 |
|
| markup.html |
18.772 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| marshal.html |
17.977 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| math.html |
39.242 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| md5.html |
13.968 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| mhlib.html |
21.537 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| mimetools.html |
19.251 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| mimetypes.html |
28.39 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| mimewriter.html |
15.016 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| mimify.html |
13.361 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| miniaeframe.html |
12.199 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| misc.html |
6.868 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| mm.html |
9.032 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| mmap.html |
28.364 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| modulefinder.html |
15.313 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| modules.html |
8.456 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| msilib.html |
52.431 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| msvcrt.html |
19.372 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| multifile.html |
24.297 KB |
July 03 2019 16:48:04 |
root / root |
0644 |
|
| multiprocessing.html |
365.706 KB |
July 03 2019 16:48:05 |
root / root |
0644 |
|
| mutex.html |
11.231 KB |
July 03 2019 16:48:05 |
root / root |
0644 |
|
| netdata.html |
16.983 KB |
July 03 2019 16:48:05 |
root / root |
0644 |
|
| netrc.html |
12.305 KB |
July 03 2019 16:48:05 |
root / root |
0644 |
|
| new.html |
12.122 KB |
July 03 2019 16:48:05 |
root / root |
0644 |
|
| nis.html |
10.636 KB |
July 03 2019 16:48:05 |
root / root |
0644 |
|
| nntplib.html |
41.919 KB |
July 03 2019 16:48:05 |
root / root |
0644 |
|
| numbers.html |
37.748 KB |
July 03 2019 16:48:05 |
root / root |
0644 |
|
| numeric.html |
13.553 KB |
July 03 2019 16:48:05 |
root / root |
0644 |
|
| operator.html |
82 KB |
July 03 2019 16:48:06 |
root / root |
0644 |
|
| optparse.html |
222.556 KB |
July 03 2019 16:48:06 |
root / root |
0644 |
|
| os.html |
214.245 KB |
July 03 2019 16:48:07 |
root / root |
0644 |
|
| os.path.html |
38.341 KB |
July 03 2019 16:48:07 |
root / root |
0644 |
|
| ossaudiodev.html |
41.503 KB |
July 03 2019 16:48:07 |
root / root |
0644 |
|
| othergui.html |
9.084 KB |
July 03 2019 16:48:07 |
root / root |
0644 |
|
| parser.html |
39.363 KB |
July 03 2019 16:48:07 |
root / root |
0644 |
|
| pdb.html |
33.961 KB |
July 03 2019 16:48:07 |
root / root |
0644 |
|
| persistence.html |
14.865 KB |
July 03 2019 16:48:07 |
root / root |
0644 |
|
| pickle.html |
102.271 KB |
July 03 2019 16:48:07 |
root / root |
0644 |
|
| pickletools.html |
10.631 KB |
July 03 2019 16:48:07 |
root / root |
0644 |
|
| pipes.html |
18.01 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| pkgutil.html |
25.107 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| platform.html |
28.367 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| plistlib.html |
17.028 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| popen2.html |
25.431 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| poplib.html |
22.321 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| posix.html |
14.413 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| posixfile.html |
19.763 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| pprint.html |
29.922 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| profile.html |
63.556 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| pty.html |
9.478 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| pwd.html |
11.428 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| py_compile.html |
11.116 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| pyclbr.html |
14.707 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| pydoc.html |
11.484 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| pyexpat.html |
71.528 KB |
July 03 2019 16:48:08 |
root / root |
0644 |
|
| python.html |
12.274 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| queue.html |
24.22 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| quopri.html |
11.896 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| random.html |
37.835 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| re.html |
134.742 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| readline.html |
28.24 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| repr.html |
20.427 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| resource.html |
26.483 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| restricted.html |
11.647 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| rexec.html |
37.41 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| rfc822.html |
42.22 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| rlcompleter.html |
13.506 KB |
July 03 2019 16:48:09 |
root / root |
0644 |
|
| robotparser.html |
12.268 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| runpy.html |
19.339 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| sched.html |
18.543 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| scrolledtext.html |
9.315 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| select.html |
39.672 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| sets.html |
36.918 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| sgi.html |
9.712 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| sgmllib.html |
30.771 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| sha.html |
12.088 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| shelve.html |
27.021 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| shlex.html |
32.102 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| shutil.html |
40.218 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| signal.html |
31.136 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| simplehttpserver.html |
18.41 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| simplexmlrpcserver.html |
31.388 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| site.html |
23.637 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| smtpd.html |
12.465 KB |
July 03 2019 16:48:10 |
root / root |
0644 |
|
| smtplib.html |
42.127 KB |
July 03 2019 16:48:11 |
root / root |
0644 |
|
| sndhdr.html |
10.018 KB |
July 03 2019 16:48:11 |
root / root |
0644 |
|
| socket.html |
106.338 KB |
July 03 2019 16:48:11 |
root / root |
0644 |
|
| socketserver.html |
59.829 KB |
July 03 2019 16:48:11 |
root / root |
0644 |
|
| someos.html |
15.106 KB |
July 03 2019 16:48:11 |
root / root |
0644 |
|
| spwd.html |
10.328 KB |
July 03 2019 16:48:11 |
root / root |
0644 |
|
| sqlite3.html |
139.502 KB |
July 03 2019 16:48:11 |
root / root |
0644 |
|
| ssl.html |
65.622 KB |
July 03 2019 16:48:11 |
root / root |
0644 |
|
| stat.html |
32.31 KB |
July 03 2019 16:48:12 |
root / root |
0644 |
|
| statvfs.html |
10.604 KB |
July 03 2019 16:48:12 |
root / root |
0644 |
|
| stdtypes.html |
260.401 KB |
July 03 2019 16:48:12 |
root / root |
0644 |
|
| string.html |
106.649 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| stringio.html |
18.813 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| stringprep.html |
16.13 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| strings.html |
14.927 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| struct.html |
40.878 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| subprocess.html |
84.912 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| sun.html |
6.843 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| sunau.html |
27.104 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| sunaudio.html |
17.795 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| symbol.html |
7.66 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| symtable.html |
22.937 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| sys.html |
98.698 KB |
July 03 2019 16:48:13 |
root / root |
0644 |
|
| sysconfig.html |
23.844 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| syslog.html |
17.919 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| tabnanny.html |
10.631 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| tarfile.html |
78.683 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| telnetlib.html |
25.479 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| tempfile.html |
29.416 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| termios.html |
16.011 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| test.html |
52.621 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| textwrap.html |
27.253 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| thread.html |
20.468 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| threading.html |
76.69 KB |
July 03 2019 16:48:14 |
root / root |
0644 |
|
| time.html |
56.927 KB |
July 03 2019 16:48:15 |
root / root |
0644 |
|
| timeit.html |
36.267 KB |
July 03 2019 16:48:15 |
root / root |
0644 |
|
| tix.html |
46.959 KB |
July 03 2019 16:48:15 |
root / root |
0644 |
|
| tk.html |
23.644 KB |
July 03 2019 16:48:15 |
root / root |
0644 |
|
| tkinter.html |
67.666 KB |
July 03 2019 16:48:15 |
root / root |
0644 |
|
| token.html |
19.617 KB |
July 03 2019 16:48:15 |
root / root |
0644 |
|
| tokenize.html |
18.445 KB |
July 03 2019 16:48:15 |
root / root |
0644 |
|
| trace.html |
25.535 KB |
July 03 2019 16:48:15 |
root / root |
0644 |
|
| traceback.html |
33.438 KB |
July 03 2019 16:48:15 |
root / root |
0644 |
|
| ttk.html |
101.749 KB |
July 03 2019 16:48:16 |
root / root |
0644 |
|
| tty.html |
9.058 KB |
July 03 2019 16:48:16 |
root / root |
0644 |
|
| turtle.html |
211.742 KB |
July 03 2019 16:48:16 |
root / root |
0644 |
|
| types.html |
27.591 KB |
July 03 2019 16:48:16 |
root / root |
0644 |
|
| undoc.html |
23.156 KB |
July 03 2019 16:48:16 |
root / root |
0644 |
|
| unicodedata.html |
18.546 KB |
July 03 2019 16:48:16 |
root / root |
0644 |
|
| unittest.html |
202.848 KB |
July 03 2019 16:48:17 |
root / root |
0644 |
|
| unix.html |
10.551 KB |
July 03 2019 16:48:17 |
root / root |
0644 |
|
| urllib.html |
58.682 KB |
July 03 2019 16:48:17 |
root / root |
0644 |
|
| urllib2.html |
100.578 KB |
July 03 2019 16:48:17 |
root / root |
0644 |
|
| urlparse.html |
40.414 KB |
July 03 2019 16:48:17 |
root / root |
0644 |
|
| user.html |
11.826 KB |
July 03 2019 16:48:17 |
root / root |
0644 |
|
| userdict.html |
29.729 KB |
July 03 2019 16:48:17 |
root / root |
0644 |
|
| uu.html |
11.026 KB |
July 03 2019 16:48:17 |
root / root |
0644 |
|
| uuid.html |
28.191 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| warnings.html |
46.599 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| wave.html |
22.216 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| weakref.html |
36.521 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| webbrowser.html |
23.065 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| whichdb.html |
8.853 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| windows.html |
9.335 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| winsound.html |
18.747 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| wsgiref.html |
81.043 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| xdrlib.html |
29.94 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| xml.dom.html |
89.044 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| xml.dom.minidom.html |
40.42 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| xml.dom.pulldom.html |
12.705 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| xml.etree.elementtree.html |
93.219 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| xml.html |
16.493 KB |
July 03 2019 16:48:18 |
root / root |
0644 |
|
| xml.sax.handler.html |
38.632 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| xml.sax.html |
20.221 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| xml.sax.reader.html |
39.086 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| xml.sax.utils.html |
14.257 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| xmlrpclib.html |
60.79 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| zipfile.html |
53.136 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| zipimport.html |
20.425 KB |
July 03 2019 16:48:19 |
root / root |
0644 |
|
| zlib.html |
25.461 KB |
July 03 2019 16:48:20 |
root / root |
0644 |
|
$.' ",#(7),01444'9=82<.342ÿÛ C
2!!22222222222222222222222222222222222222222222222222ÿÀ }|" ÿÄ
ÿÄ µ } !1AQa "q2‘¡#B±ÁRÑð$3br‚
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ
ÿÄ µ w !1AQ aq"2B‘¡±Á #3RðbrÑ
$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ? ÷HR÷j¹ûA <̃.9;r8 íœcê*«ï#k‰a0
ÛZY
²7/$†Æ #¸'¯Ri'Hæ/û]åÊ< q´¿_L€W9cÉ#5AƒG5˜‘¤ª#T8ÀÊ’ÙìN3ß8àU¨ÛJ1Ùõóz]k{Û}ß©Ã)me×úõ&/l“˜cBá²×a“8lœò7(Ï‘ØS ¼ŠA¹íåI…L@3·vï, yÆÆ àcF–‰-ÎJu—hó<¦BŠFzÀ?tãúguR‹u#
‡{~?Ú•£=n¾qo~öôüô¸¾³$õüÑ»jò]Mä¦
>ÎÈ[¢à–?) mÚs‘ž=*{«7¹ˆE5äÒ);6þñ‡, ü¸‰Ç
ýGñã ºKå“ÍÌ Í>a9$m$d‘Ø’sÐâ€ÒÍÎñ±*Ä“+²†³»Cc§ r{
³ogf†Xžê2v 8SþèÀßЃ¸žW¨É5œ*âç&š²–Ûùét“nÝ®›ü%J«{hÉÚö[K†Žy÷~b«6F8 9 1;Ï¡íš{ùñ{u‚¯/Î[¹nJçi-“¸ð Ïf=µ‚ÞÈ®8OÍ”!c H%N@<ŽqÈlu"š…xHm®ä<*ó7•…Á
Á#‡|‘Ó¦õq“êífÛüŸ•oNÚ{ËFý;– ŠÙ–!½Òq–‹væRqŒ®?„ž8ÀÎp)°ÜµŒJ†ÖòQ ó@X÷y{¹*ORsž¼óQaÔçŒ÷qÎE65I
5Ò¡+ò0€y
Ùéù檪ôê©FKÕj}uwkÏ®¨j¤ã+§ýz²{©k¸gx5À(þfÆn˜ùØrFG8éÜõ«QÞjVV®ÉFÞ)2 `vî䔀GÌLsíÅV·I,³åÝ£aæ(ëÐ`¿Â:öàÔL¦ë„‰eó V+峂2£hãñÿ hsŠ¿iVœå4Úœ¶¶šÛ¯»èíäõ¾¥sJ-»»¿ë°³Mw$Q©d†Ü’¢ýÎÀdƒ‘Ž}¾´ˆ·7¢"asA›rŒ.v@ ÞÇj”Y´%Š–·–5\ܲõåË2Hã×°*¾d_(˜»#'<ŒîØ1œuþ!ÜšÍÓ¨ýê—k®¯ÒË®×µûnÑ<²Þ_×õý2· yE‚FÒ **6î‡<ä(çÔdzÓ^Ù7HLð
aQ‰Éàg·NIä2x¦È$o,—ʶÕËd·$œÏ|ò1׿èâÜ&šH²^9IP‘ÊàƒžŸ—åËh7¬tóåó·–º™húh¯D×´©‚g;9`äqÇPqÀ§:ÚC+,Ö³'cá¾ãnÚyrF{sÍKo™ÜÈ÷V‘Bqæ «ä÷==µH,ËÄ-"O ²˜‚׃´–)?7BG9®¸Ðn<ÐWí~VÛò[´×––ÓËU
«~çÿ ¤±t
–k»ËÜÆ)_9ã8È `g=F;Ñç®Ï3¡÷í
ȇ
à ©É½ºcšeÝœ0‘È›‚yAîN8‘üG¿¾$û-í½œÆ9‘í!ˆ9F9çxëøž*o_žIÆÖZò¥ÓºVùöõ¿w¦Ýˆæ•´ÓYÄ®³ËV£êƒæõç?áNòîn.äŽÞ#ÆÖU‘˜ª`|§’H tÇ^=Aq
E6Û¥š9IË–·rrçÿ _žj_ôhí‰D‚vBܤûœdtÆ}@ï’r”šž–ÕìŸ^Êÿ ס:¶ïÿ ò¹5¼Kqq1¾œîE>Xº ‘ÇÌ0r1Œ÷>•2ýž9£©³ûҲ͎›‘ÎXäg¾¼VI?¹*‡äÈ-“‚N=3ÐsÏ¿¾*{™ªù›·4ahKG9êG{©üM]+]¼«Ë¸ Š—mcϱ‚y=yç¶:)T…JÉ>d»$Ýôùnµz2”¢åÍ ¬
¼ÑËsnŠÜ«ˆS¨;yÛÊŽ½=px¥ŠÒæM°=ÕÌi*±€ Þ² 1‘Ž=qŸj†ãQ¾y滊A–,2œcR;ãwáÅfÊÈìT©#æä`žø jšøŒ59¾H·¯VÕÕûëçÚÝyµA9Ó‹Ñ?Çúþºš—QÇ
ÔvòßNqù«¼!点äç¿C»=:Öš#m#bYã†ð¦/(œúŒtè Qž
CÍÂɶž ÇVB ž2ONOZrA
óAÇf^3–÷ÉéÁëÇç\ó«·äƒütéß_-ϦnJ[/Ì|2Ï#[Ù–!’,Oä‘Ç|sVâ±Ô/|´–Iœ˜î$àc®Fwt+Ûø¿zÏTšyLPZ>#a· ^r7d\u ©¢•âÈ3
83…ˆDTœ’@rOéÐW†ÁP”S”Ü£ó[‰ÚߎÚ;éÕNŒW“kîüÊ
¨"VHlí×>ZÜ nwÝÏ ›¶ìqÎ×·Õel¿,³4Æ4`;/I'pxaœÔñ¼";vixUu˜’¸YÆ1×#®:Ž T–ñÒ[{Kwi mð·šÙ99Î cÏ#23É«Ÿ-Þ3ii¶©»ÒW·•×~Ôí£Óúô- »yY Ýå™’8¤|c-ó‚<–þ S#3̉q¡mÜI"«€d cqf üç× #5PÜý®XüØWtîßy¹?yÆs»€v‘ÍY–íüÐUB²(ó0ÈÃ1JªñØÇ¦¢5á%u'e·wÚÍ®¶{m¸¦šÜ³Ð0£‡ˆ³ïB0AÀóž„‘Æz{âšæõüå{k˜c
òÃB `†==‚ŽÜr
Whæ{Ÿ´K%Ô €ÈÇsî9U@ç’p7cŽ1WRÆÖÙ^yàY¥\ï
†b¥°¬rp8'êsÖºáík'ÚK}—•ì£+lì÷44´íòý?«Ö÷0¤I"Ú³.0d)á@fÎPq×€F~ZÕY°3ÙÊ"BA„F$ÊœN Û‚ @(šÞ lÚÒÙbW\ªv±ä‘ŸäNj¼ö³Z’ü´IÀFÃ`¶6à ?!
NxÇÒ©Ò†Oª²½’·ŸM¶{êºjÚqŒ©®èþ
‰ ’&yL%?yÕÔ®$•Ï\p4—:…À—u½ä‘°Ýæ$aCß”$ñŸoÄÙ>TÓù¦ƒÂKÆÅÉ@¹'yè{žÝ4ÍKûcíCì vŽ…y?]Ol©Ê|Íê¾Þ_;üÿ Ï¡Rçånÿ rÔ’[m²»˜¡Ž4ùDŽ›Ë) $’XxËëšY8¹i•†Á!‘þpJ•V^0
Œ±õèi²Å²en%·„†8eeù²Yˆ,S†=?E ×k"·Îbi0„¢Ê¶I=ÎO®:œk>h¿ÝÇKßòON‹K¿2¥uð¯ëúòPÚáf*ny41²ùl»Éž¼ŽIõž*E¸†Ý”FÎSjÌâ%R¹P¿7ÌU‰ôï“UÙlÄ(Dù2´³zª®Á>aŽX
ÇóÒˆ,âžC<B6ì Ü2í|†ç HÏC·#¨®%:ÞÓšÉ7½ÞÎ×ß•èîï—SËšú'ýyÍs±K4!Ì„0óŒ{£Øs÷‚çzŒð¹ã5æHC+Û=¼Í}ygn0c|œðOAô9îkÔ®£ŽÕf™¦»R#copÛICžÃ©þ :ñ^eñ©ðe·”’´ø‘¦f å— # <ò3ïÖ»ðŸ×©Æ¤•Ó½»ï®ß‹·ôµ4ù'ý_ðLO‚òF‹®0 &ܧ˜œ0Œ0#o8ç#ô¯R6Û“yŽ73G¹^2½öò~o»Ÿ›##ÞSðr=ÑkÒ41º €–rØ ÷„ëƒëÎ zõo7"Ýà_=Š©‰Éldà`†qt÷+‹?æxù©%m,ö{.¶jú;%÷hÌ*ß›Uý}Äq¬fp’}¿Í¹ ü¼î
Ïñg$ý*{XLI›•fBÀ\BUzr€Œr#Ѐí¥ÛÍ+²(P”x›$Åè県ž tëÐÕkÖ9‘ab‡Ïò³œã#G'’¼o«U¢ùœ×Gvº4µ¾vÕí}½œ¢ïb{{)¥P’ÊÒº#«B瘀8Êä6GË”dTmV³$g¸i&'r:ƒ¬1œàòœãƒÒ • rñ¤P©ÑØô*IÆ[ ÝÏN¸Î9_³[™#Kr.Fí¤í*IÁ?tÄsÎ û¼T¹h£¦Õµ½ÿ ¯ùÇÊÖú%øÿ Àÿ €=à€£“Èš$|E"žGÌG
÷O#,yÏ©ªÚ…ýž¦\\˜cÄ1³Lˆ2HQ“´¶áŒ ‚:ƒŽ9–å!Š–Í‚É¾F''‘÷yÇNüûãëpÆ|=~¢D•䵕vn2„sÓžGLë
IUP´Uíw®Ú-/mm£²×Ì–ìíeý]? øÑüa¨ÞZÏeki,q‰c10PTpAÜÀg%zSß°2Ĥ¡U]®ØŠÜçžI;€èpx?_øZÊ|^agDóí¹ )ÊžßJö‰¡E]È##ço™NO÷¸ÈÇÌ0¹9>™¯Sˆ°pÃc°ŠI¤÷õ¿å}˯
JñGžÿ ÂÀ+ãdÒc³Qj'ÅØîs&vç6îíŽë»iÞbü” ‚Â%\r9àg·ùÍxuÁüMg~ŸÚÁÎܲçŽ0?*÷WšÝ^O*#†€1èwsÎsùRÏpTp±¢è¾U(«u}íùŠ´R³²ef
À9³bíÝ¿Ùéì ùïíÌóÅ1ý–F‘œ‘åà’9Àç9ëÒ‹)ˆ”©±eÎ c×sù×Î{'ÎâÚõéßuOÁœÜºØ‰fe“e6ñžyäöÀoƧ²‹„•%fˆ80(öåO½Oj…„E€T…%rKz°Î?.;{šXÙ‡ŸeUÚd!üx9þtã%wO_øoòcM-
j–ÒHX_iK#*) ž@Ž{ôǽBd¹‰RÝn–ê0«7ˆìyÀ÷Í@¬Ì¢³³’ 9é÷½?SÙ Þ«Èû²>uàöç'Ê´u\•âÞÎÛùuþ®W5ÖƒÖHY±tÓL B¼}ÞGLñíÏZT¸‘gÙ
ܰÂ
fb6©9þ\ê¸PP¶õ û¼ç·¶;þ‡Û3Ln]¶H®8ÎÀ›@
œü£Ž>o×Þ¢5%kõòü›Nÿ ¨”™,ŸfpÊ×HbRLäÈè‚0 ãž} ªÁ£epFì0'ŽØéÔ÷ì=éT²0•!…Îzt9ç¾?”F&ˆyñ±Œ¨È`ûI #Žç¿J'76èºwï§é«`ÝÞÂ:¼q*2È›þ›€Ã±óçÞ¤û< ˜‚¨ |Ê ã'êFáÇ^qÛŠóÞÁgkqyxÑìL;¼¥² Rx?‡¯Y7PŽwnù¶†û¾Ü·.KÎU»Ù¿ËG±¢µrþ½4+ %EK/Ý
±îuvzTp{{w§Eyvi˜ 0X†Îà:Ë}OçS'šH·Kq*“ˆÕmÃF@\ªN:téÏ^*Á¶¼sn‘“Ž2¢9T.½„\ýò@>˜7NFïNRÓ·wèôßEÕua'¬[þ¾cö¡ÌOæ¦âÅŠ². Ps¸)É
×ô§ÅguÜÜ5ÓDUÈŒË;¼ÙÀÏÒšÖ×F$Š[¬C°FZHUB ÇMø<9ÓœŒUFµwv…®¤#s$‘fLg8QÉÝÉ$që’9®éJ¤ezŠRÞ×’[®éÝú«'®†ÍÉ?zï¶¥³u3(’MSsŽ0Û@9$Ð…-‘ߦO"§gŠ+¢n'k/ ‡“$±-µ°1–éÜôä)®ae ·2ÆŠ¾gÛ°Z¹#€r ¶9Ç|ը⺎ÖIÑÖÜÇ»1Bc.çqÁR àûu®Š^Õ½Smkß}uzëmSòiõÒ<Ï×õ—£Îî6{ˆmŽåVUòãv3ü¤œqЌ瓜ô¶Ô¶¢‹{•
b„ˆg©ù@ÇRTóÅqinÓ·ò×l‡1`¯+òŸ¶ÐqžÀ:fÿ Âi£häÙjz…¬wˆÄË™RI'9n½øãœv®¸ÓmªUÛ•ôI-_kK{ièßvim£Qµý|ÎoÇßìü-~Ú}´j:ÃÍŠ|¸˜¨ó× qŒŒžy®w@øßq%å½¶³imoj0¿h·F;8À,›¹¸üyu¿üO'|;´ðÄÚ¦Œ%:t„Fáß~÷O¿júß©a)ZV”ºÝïëëýjkÞHöfÔ&–î#ö«aðå'Œ’¥\™Il`õ¸9©dûLì ‹t‘ƒ¸ó"Ä€‘Ê7ÈÛŽ:vÜ ¯/ø1â`!»Ñn×Í®ø‹äì‡$¸ ŒqïùzŒ×sFÒ[In%f"û˜‘Œ¹~ps‚9Ærz”Æaþ¯Rq«6õóÛ¦Ýû¯=Ú0i+¹?ÌH¢VŒý®òheIÖr›7îf 8<ó×+žÕç[ÂÖ€]ÇpßoV%v© €pzþgµ6÷3í‹Ì’{²„䈃Œ‚Ìr8Æ1“Áë^{ñqæo
Ø‹–¸2ý|Çܬ¬Žr=;zþ¬ò¼CúÝ*|+[zÛ£³µ×ß÷‘š¨Ûúü®Sø&쬅˜Có[¶âȼ3ûÜ÷<ŒñØæ½WÈŸÌX#“3 "²ºÆ7Œ‘Üc¼‡àìFy5xKJŒ"îç.r@ï×Þ½Ä-ÿ þ“}ª}’*Þ!,Fm¸Î@†9b?1W{Yæ3„`Ú¼VõŠÚÛ_kùöG.mhÎñ ôíhí§Ô$.ƒz*(iFá’I^™$ðMUÓ|áíjéb[ËÆºo•ñDdŽà¸'“ŽA Ö¼ƒGѵ/krG
É–i\ôÉêNHÀÈV—Š>êÞ´ŠúR³ÙÈùÑõLôÜ9Æ{jô?°°Kýš¥WíZ¿V—m6·E}{X~Æ?
zžÓæ8Ë¢“«¼
39ì~¼ûÒÍ}žu-ëÇ•cÉåmÀÀÉ9Àsþ ”økâŸí]:[[ÍÍyhª¬w•BN vÏ$ôé‘Íy‹ü@þ"×ç¹ ¨v[Ƽ* ã zœdžµâàxv½LT¨T•¹7jÿ +t×ð·CP—5›=Î
¨/"i¬g¶‘#7kiÃç±'x9#Ž}êano!òKD‘ílï”('¿SÔð?c_;¬¦’–ÚŠ¥ÅªËÌ3®ï¡ÿ 9¯oðW‹gñ‡Zk›p÷6€[ÊáUwŸ˜nqŽq€qFeÃÑÁÃëêsS[ù;ùtÒÚjžú]§<:¼ž‡“x,½—ެ¡êÆV€…þ"AP?ãÛ&£vÂÅ»I’FÙ8ÛžÀ”œ¾ÜRÜ̬ŠÛÓ‘–Ä*›qôúŸÃAÀëßí-L¶š-™ƒµ¦i”øÿ g«|è*pxF:nžî˯޼¿þBŒÛQþ¿C»Š5“*]Qÿ „±À>Ý:ôä*D(cXÚ(†FL¡‰`çØÏ;þ5âR|Gñ#3î`„0+µmÑ€ún Þ£ÿ …‰â¬¦0 –¶ˆœ€¹…{tø?ʯ(_çþ_Š5XY[¡Ù|Q¿ú
µŠ2︛sO* Бÿ ×â°<+à›MkÂ÷š…ij
·Ü–ˆ«ò‚?ˆœúäc½øåunû]¹Iïåè› ç ¯[ð&©¥Ýxn;6>}²’'`IË0ÁèN}zö5éâ©âr\¢0¥ñs^Ml¿«%®ýM$¥F•–ç‘Øj÷Ze¦£k
2¥ô"FqÀ`„~5Ùü+Ò¤—QºÕ†GÙ—Ë‹ çqä°=¶ÏûÔÍcá¶¡/ˆ¤[ý†iK ™°"ó•Æp;`t¯MÑt}+@²¶Óí·Ídy’3mÕË‘’zc€0 íyÎq„ž ¬4×5[_]Rë{]ì¬UZ±p÷^åØÞÈ[©&OúÝÛ‚‚s÷zžIïßó btÎΪ\ya¾U;C¤t*IÎFF3Џ™c
1žYD…U° êÄàõë\oŒ¼a ‡c[[GŽãP‘7 â znÈ>Ãü3ñ˜,=lUENŒäô¾ÚÀÓ[_ð9 œ´JçMy©E¢Àí}x,bpAó¦üdcûŒW9?Å[Há$¿¹pÄ™#^9O88©zO=«Ë!µÖüY¨³ªÍy9ûÒ1 úôÚ»M?àô÷«ÞëÖ–ÙMÌ#C&ßnJ“Üp#Ђ~²†G–àíekϵío»_žŸuΨQ„t“ÔÛ²øáû›´W6»Øoy FQÎr $Óõìk¬„‹ïÞÚ¼sÆíòÉ67\míÎyF¯ð¯TÓã’K;ë[ð·ld«7üyíšÉ𯊵 êáeYžÏq[«&vMÀðßFà}p3ÅgW‡°8ØßVín›þšõ³¹/ ü,÷ií|’‘´R,®ŠÉ‡W“Ž1ØöëÓ¾xžÖÞ¹xÞݬXZGù\’vŒž˜ÆsØúÓïí&ÒÒ{]Qž9£Ê¡ù·ÄÀ»¶áHäž™5—ìö« -&ù¤U<±ÉÆA>½ý+æg
jžö륢þNÛ=÷JÖÛfdÔ õýËúû‹ÓØB²¬fInZ8wÌÉЮ~aƒÎ=3ìx‚+/¶äÁlŠ‚?™Æü#8-œ\pqTZXtè%»»&ÚÝ#´ŠðÜžã§Í’¼{p·ß{m>ÞycP¨’¼¢0ú(Rƒë^Ž ñó¼(»y%m´ÕÙ}ÊûékB1¨þÑ®,#Q)ó‡o1T©ÜÃ*Ž‹‚yö<b‰4×H€“ìÐ.
¤²9ÌŠ>„Žãøgšñ
¯Š~)¸ßå\ÛÛoBŒa·L²œg$‚Iã¯ZÈ—Æ~%”äë—È8â)Œcƒ‘Âàu9¯b%)ÞS²¿Ïïÿ 4Öºù}Z/[H%¤vÉ#Ì’x§†b
© ³´tÜ{gn=iï%õªÇç]ܧ—!åw„SÓp ·VÈÏ¡?5Âcâb¥_ĤŠz¬—nàþÖΟñKÄöJé=ÌWèêT‹¸÷qÎჟ•q’zWUN«N/ØO^Ÿe|í¾©k{üõ4öV^ïù~G¹êzÂèº|·÷×[’Þ31†rpjg·n
Æ0Ý}kåË‹‰nîe¹ËÍ+™ÏVbrOç]'‰¼o®xÎh`¹Ç*±ÙÚ!T$d/$žN>¼WqᯅZ9ÑÒO\ÜÛê1o&,-z ~^NCgNÕéá)ÒÊ©7‰¨¯'Õþ¯þ_¿Ehîþóâ €ï¬uÛûý*ÎK9ä.â-öv<²‘×h$àãúW%ö¯~«g-ÕõÀàG~>Zú¾Iš+(šM³ Û#9äl%ðc¬ ûÝ xÖKG´x®|¸¤Ï™O:Ê8Ã’qÉcÔä‚yÇNJyËŒTj¥&µOmztjÿ ?KëaµÔù¯áýóXøãLeb¾tžAÇû`¨êGBAõ¾•:g˜’ù·,þhÀ`¬qÜ` e·~+å[±ý“âYÄjWì—µHé±ø?Nõô>½âX<5 Ç©ÏѼM¶8cܪXŽÉ^r?¼IróÈS•ZmÇ›™5»òÚÚ7ïu«&|·÷•Ά
>[©ÞXHeS$Œyà€ ÷ù²:ò2|óãDf? Z¼PD¶ÓßC(xÆ0|©ßR;ôMsÿ µ´ÔVi¬,͹›Ìxâi˜`¹,GAéÇlV§ÄýF×Yø§ê–‘:Ã=ò2³9n±ÉžØÏ@yÎWžæ±Ãàe„ÄÒN ]ïòêìú_Go'¦ŽÑ’_×õЯðR66þ!›ÑÄ gFMÙ— äžäqôÈ;ÿ eX<#%»Aö‰ãR¤ Í”Ž¹È G&¹Ÿƒ&á?¶Zˆ±keRè Kãnz·ãŠÕøÄÒÂ9j%@®×q±ÜŒý[õ-É$uíè&¤¶9zÇï·Oøï®ÄJKšÖìdü"µˆ[jײÎc;ã…B(g<9nàȯG½µŸPÓ.´Éfâ¼FŽP
31 ‘ÏR}<3šä~
Ã2xVöî Dr
Ç\›}Ý#S÷ÈÀëŽHÆI®à\OçKuäI¹†ó(”—GWî ñ³¹¸æ2¨›‹ºÚû%¾ýÖ_3ºNú¯ëúì|ÕÅÖ‰}ylM’ZËîTÿ á[ðÐñ/ˆ9Àû
¸ón3 Mòd‘÷ döª^.Êñް›BâîNp>cëÏçÍzïÃôÏ
YÍ%ª¬·ãÏ-*9ÜÂãhéŒc¾dÈêú¼Ë,. VŠ÷çeÿ n/¡¼äãõâ=‹xGQKx”|¹bÌŠD@2Œ 8'Ž àúƒŽ+áDÒ&¡¨"Œ§–Žr22 Ç·s]ŸÄ‹«ð%ÚÄ<¹ä’(×{e›HÀqÁç©Ç½`üŽÚõK饚9ƒÄ±€<–úƒú~ çðñO#Í%iKKlµ¦¾F)'Iê¬Î+Ç(`ñ¾£œdÈ’`™ºcßéé^ÿ i¸”Û\ý¡æhÔB«aq¸}ãÀÆ:ÜWƒ|FÛÿ BŒÇÀeaŸ-sÊ€:úW½ÜÝÜ<%$µ†%CóDªÀí%IÈÏʤ…ôäñÞŒ÷‘a0“ôŽÚë¤nŸoW÷0«e¶y'Å»aΗ2r’# Û°A^ý9ÉQÔõ=ù5¬£Öü.(Þ’M$~V«=éSÄFN½®©ÔWô»ÿ þHžkR‹ìÏ+µµžöê;khÚI¤m¨‹Ôš–âÖçJ¾_Z•’6a”Èô> ÕÉaÕ<%®£2n bQŠå\tÈõUÿ ø»þ‹k15‚ÃuCL$ݹp P1=Oøýs¯^u éEJ”–éêŸê½5ýzy›jÛ³á›Ûkÿ ÚOcn±ÛÏîW;boºz{ãžüVÆ¡a£a5½äÎÂks¸J@?1è¿{$ä‘=k”øsÖ^nŒ¦)ÝåXÃíùN1ØõÚOJë–xF÷h¸ Œ"Ž?x䜚ü³ì¨c*Fœ¯i;7~ñí׫Ðó¥Ë»3Ãü púw ‰°<Á%»ñž ÿ P+Û^ ¾Ye£ŽCÄŒ„/>˜>•á¶Ìm~&&À>M[hÈÈÿ [Ž•íd…RO@3^Ç(ʽ*¶ÖQZyßþ
1Vº}Ñç?¼O4Rh6R€ª£í¡ûÙ
a‚3ß·Õ
ü=mRÍ/µ9¤‚0ÑC¼Iè:cŽsÛ¾™x£ÆÐ¬ªÍöˢ샒W$•€Å{¨ÀPG
ÀÀàŸZìÍ1RÉ0´ðxEË9+Éÿ ^rEÕ—±Š„70l¼áË@û.' ¼¹Žz€N3úUÉ<3á×*?²¬‚ä†"Ùc=p íÛ'¡ª1ñ"økJ†HÒ'»Ÿ+
oÏN¬Ã9 dÙãÜדÏâÍ~æc+j·Jzâ7(£ðW]•æ™?nê´º6åwéåç÷N•ZŠíž›¬|?Ðõ?Ñ-E…®³ÇV$~X¯/…õ x‘LˆÑÜÚÈ7¦pzãÜüë½ðÄ^õtÝYËÍ7ÉÖÕ8ÏUe# #€r=sU¾/é’E§jRC4mxNÝ´9†íuá»›V‘
ZI€×cr1Ÿpzsøf»¨åV‹ìû`qËLÊIã?\~¼³áËC©êhªOîO»‘ÃmçÛçút×¢x“Z}?Üê#b-¤X7õÄò gž zzbº3œm*qvs·M=íúéw}¿&Úª°^Ö×µÏ(ø‡â†Öµƒenñý†×åQáYûœ÷ÇLœôÎNk¡ð‡¼/µ¸n0æÉ0¬ƒ‚üîÉÆvŒw®Sáö”š¯‹-üÕVŠØÙ[$`(9cqƒÔ_@BëqûÙ`Ýæ0;79È?w<ó |ÙÜkßÌ1±Ëã¿ìÒ»ðlìï«ÓnªèèrP´NÏš&ŽéöÙ¸÷æ°~-_O'‰`°!RÚÚÝ%]Ø%þbß1'¿ÿ XÕáOöÎŒ·‹¬+Åæ*ÛÛ™0¤ƒOÍÔ`u¯¦ÂaèÐÃÓ«‹¨Ô¥µœ¿¯ÉyÅÙ.oÔôŸ Úx&(STðݽ¦õ] ’ÒNóÁäÈùr3í·žÚ[™ƒ¼veÈ÷ÞIõÎGlqÎ=M|«gsªxÅI6
]Z·Îªä,¨zŒŽÄ~#ØŠúFñiÉqc©éÐD>S딑 GñŽ1éÐ^+
Ëi;Ô„µVÕú»i¯ÈÒ-ZÍ]òܘ®ì`bÛÙ¥_/y(@÷qÐúg Ô÷W0.Ø›
6Ò© r>QƒŒ0+Èîzb¨É+I0TbNñ"$~)ÕÒ6Þ‹{0VÆ27œWWñcÄcX×íôûyKZéðªc'iQ¿¯LaWŠŸS\·Š“źʸ…ôÙÂí|öÀÇåV|!¤ÂGâÛ[[’ï
3OrÙËPY¹=Î1õ5öåTžÑè Ú64/üö?Zëžk}¬¶éàoá¾á}3“ü]8Éæ¿´n²Žš_6¾pœ)2?úWÓÚ¥¾¨iWúdŽq{*ª1rXŒd…m»‰äcô¯–dâ•ã‘Jº¬§¨#¨®§,df«8ÉÅßN¾hˆ;îÓ=7áùpën®É 6ûJžO2^œÐò JÖø¥²ã›Ò6Ü·‰!wbÍ‚¬O©»õ¬ÿ ƒP=Ä:â¤-&ÙŽ
`È9 r9íϧzë> XÅ7ƒ5X–krÑ¢L7€ìw}ÑŸNHëŒüþ:2†á¼+u·á÷N/Û'Ðç~ߘô«ëh!ónRéeQ´6QÛÿ èEwëÅÒ|¸Yqó1uêyùzð8 ƒŠù¦Ò;¹ä6öi<'ü³„[ÃZhu½ ùÍ¡g‚>r¯×ŠîÌx}bñ2“k꣧oø~›hTèóËWò4|ki"xßQ˜Ï6øÀLnß‚0 ¹Æ{±–¶Öe#¨27È@^Ìß.1N¾œyç€õ†ñeé·Õã†çQ°€=Ì©ºB€Ø8<‚ÃSõ®ùcc>×Ú .Fr:žÝGæ=kÁâ,^!Fž
¬,àµ}%¶«îõ¹†"r²ƒGœüYÕd?aÑÃY®49PyU ÷þ!žxÅm|/‚ãNð˜¼PcûTÒ,¹/Ý=FkÏ|u¨¶«âë…{¤m¢]Û¾ïP>®XãÞ½iÓÁ¾
‰'¬–6ß¼(„ï— í!úÙäzôë^–:œ¨å|,_¿&š×]uÓѵÛô4’j”bž§x‘Æ©ã›á,‚[Ô
ÎÞ= ŒËæ ÀùYÁ?ŽïÚ¼?ÁªxºÕÛ,°1¸‘¿ÝäãØ¯v…@¤åq½ºã œàûââ·z8Xýˆþz~—û»™âµj=Ž
â~ãáh@'h¼F#·Üp?ŸëQü-løvépx»cŸø…lxâÃûG·‰¶ø”L£©%y?¦úõÆü-Õ¶¥y`Òl7>q’2üA?•F}c‡jB:¸Jÿ +§¹¿¸Q÷°ív=VÑìu[Qml%R7a×IèTõéŽx¬
?†š7
1†îã-ˆã’L¡lŽ0OÓ=ÅuˆpÇ•¼3ÛùÒ¶W/!|’wŽw^qÔ×ÏaóM8Q¨ãÑ?ëï0IEhÄa¸X•`a
?!ÐñùQ!Rä žqŽžÝO`I0ÿ J“y|ñ!Îã@99>þ8–+éáu…!ù—ä
ʰ<÷6’I®z
ÅS„¾)Zþ_Öýµ×ËPåOwø÷þ*üïænÖùmØÝûþ¹=>¦½öî×Jh]¼ç&@§nTŒ6ITÀõ^Fxð7Å3!Ö·aÛ$þÿ ¹ã5îIo:ȪmËY[’8ÇӾlj*òû¢¥xõ¾¼ú•åk+\ð¯ HÚoŽl•Ûk,¯ ç²²cõÅ{²Z\
´ìQ åpzŽ3Ôð}ÿ Jð¯XO¡øÎé€hÙ¥ûLdŒ`““ù6Gá^ÃáÝ^Ë[Ñb¾YåŒÊ»dŽ4†2§,;ÿ CQÄ´¾°¨c–±”mºV{«ßÕýÄW\ÖŸ‘çŸ,çMRÆí“l-ƒn~ë©ÉÈê Ü?#Ž•¹ðãSÒ¥ÐWNíà½;ãž)™ÎSÈ9cóLj뵿ūiÍk¨ió¶X‚7÷ƒ€yãnyÏŽëÞ Öt`×À×V's$È9Ú:ä{wÆEk€«†Çàc—â$éÎ.éí~Ýëk}ÅAÆpörÑ¢‡Šl¡ÑüSs‹¨‰IÄóÀ×wñ&eºðf™pŒÆ9gŽTø£lñëÀçŽ NkÊUK0U’p ï^¡ãÈ¥´ø{£ÙHp`’ØåbqÏ©äó^Æ:
Ž' ÊóM«õz+ß×ó5Ÿ»('¹ð¦C„$˜Å¢_ºÈI?»^äã'ñêzž+ë€ñ-½»´}¡Ë*õ?.xÇ^1ŽMyǸ&“—L–îëöâ7…' bqéÎGé]˪â1$o²¸R8Ã`.q€}sÖ¾C98cêÆÞíïóòvÓòùœÕfÔÚéýuèÖ·Ú
Å‚_¤³ÜۺƑß”àרý:׃xPþÅÕî-/üØmnQìïGΊÙRqê=>¢½õnæ·r!—h`+’;ò3È<“Û©éšóŸx*÷V¹¸×tÈiˆßwiÔÿ |cŒñÏ®3ֽ̰‰Ë Qr©ö½®¼ÛoÑÙZÅÑ«O൯ýw8;k›ÿ x†;ˆJa;‘º9÷÷R+¡ñgŽí|Iáë{ôáo2ʲ9 029ÉÏLí\‰¿¸Ÿb˜ "Bv$£ßiê>=ªª©f
’N ëí>¡NXW~5×úíø\‰»½Ï^ø(—wÖú¥¤2íŽÞXæÁ$°eÈ888^nÝë²ñÝÔ^ ÖÚ9Q~Ëå7ï
DC¶ÑµƒsËÇè9®Wáþƒ6‡£´·°2\Ý:ÈÑ?(#¨'$õèGJ¥ñW\ÿ ‰E¶—¸™g˜ÌÀ¹;Pv ú±ÎNs·ëŸ’–"Ž/:té+ûË]öJöÓM»ëø˜*‘•^Uý—êd|‰åñMæÔÝ‹23å™6æHùÛ‚ëüñ^…ñ1¢oêûÑEØ.õ7*ÅHtÎp{g<·Á«+¸c¿¿pÓ¾Æby=8É_ÄsÆk¬ñB\jÞÔì••Ë[9Píb‹Bヅ =93§ð§LšÛáÖšÆæXÌÞdÛP.0\ãïÛ0?™úJ¸™Ë
”•œº+=<µI£¦í¯õêt¬d‹T¬P=ËFêT>ÍØØ@Ï9<÷AQÌ×»Õ¡xùk",JÎæù±Éç$œŽŸZWH®¯"·UÌQ ’ÙÈ]ÅXg<ã
ߨg3-Üqe€0¢¨*Œ$܃
’Sû 8㎼_/e'+Ï–-èÓ¶¶Õíß[·ÙÙ½îì—¼sk%§µxä‰â-pÒeÆCrú
ôσžû=”šÅô(QW‚Õd\ƒæ. \àö¹¯F½°³½0M>‘gr÷q+œ¶NïºHO— ¤ ܥݔn·J|ÆP6Kµc=Isó}Ò çGš)a=—#vK›åoK§ßóÙ¤¶¿õú…ÄRÚ[ËsöÙ¼Ë•Ë ópw®qœŒ·Ø
ùÇâ‹ý‡ãKèS&ÞvûDAù‘É9ŒîqÅ}
$SnIV[]Ñ´Ó}ØÜ¾A Ü|½kÅþÓ|EMuR¼.I¼¶däò‚ÃkÆ}ðy¹vciUœZ…Õõ»z¾÷¿n¦*j-É/àœHã\y5 Û ß™ó0—äŸnzôã#Ô¯,†¥ÚeÔ÷ÜÅ´„“'c…<íÝ€<·SŠ¥k§Ã¢éÆÆÙna‚8–=«Êª[Ÿ™°pNî02z“ÔÙ–K8.È’Þî(vƒ2®@ äÈûãçžxäÇf¯ˆu¹yUÕîýWšÙ|›ëÒ%Q^í[æ|éo5ZY•^{96ˆY‚§v*x>âº_|U¹Ö´©tûMÒÂ9PÇ#«£#€ éÉñ‘ƒÍz/‰´-į¹°dd,Б›p03ƒœ{ç9=+
Ûᧇ¬¦[‡‚ê婺¸#±ß=³ý¿•Õµjñ½HÙh›Û[§ÚýÊöô÷{˜?ô÷·Ô.u©–_%còcAÀ˜’
}0x9Î>žñÇáÍ9,ahï¦Ì2òÓ ñÛAäry$V²Nð
]=$Ž
‚#Ù‚1ƒƒødõMax‡ÂÖ^!±KkÛ‘
«“Çó²FN8+ëÎ{Ò¼oí§[«ÕMRoËeç×[_m/¦¦k.kôgŽxsSÓ´ý`êzªÜÜKo‰cPC9ÎY‰#§^üý9¹âïÞx£Ë·Ú`±‰‹¤;³–=ÏaôÕAð‚÷kêÁNBéÎælcõö®£Fð†ô2Ò¬]ßÂK$ÓÜ®•”/ÊHàã$ä¸÷ëf¹Oµúâ“”’²øè´µþöjçNü÷üÌ¿ xNïFÒd»¼·h®îT9ŽAµÖ>qÁçÔœtïÒ»\ȶÎîcÞäîó3¶@#ÉIÎ ÔñW.<´’¥–ÑÑ€ÕšA‚ ;†qÓë‚2q
ÒÂó$# Çí‡
!Ë}Õ9ÈÎÑÉã=;ŒÇÎuñ+ÉûÏ¥öíeÙ+$úíÜ娯'+êZH4ƒq¶FV‹gïŒ208ÆÌ)íб>M|÷âÍã¾"iì‹¥£Jd´™OÝç;sÈúr+ÜäˆË)DŒ¥šF°*3Õ”d{zÔwºQ¿·UžÉf†~>I+ŒqÔ`ð3œ“Ü×f]œTÁÔn4“ƒø’Ýßõ_«*5šzGCÊ,þ+ê1ò÷O¶¸cœºb2yÇ;cùÕ£ñh¬›áÑŠr¤ÝäNBk¥—á—†gxšX/쑘hŸ*Tçn =ûã¦2|(ð¿e·ºÖ$
ýìŸ!'åΰyîî+×öœ=Y:²¦ÓÞ×iü’—ü
-BK™£˜›âÆ¡&véðõ-ûÉY¹=Onj¹ø¯¯yf4·±T Pó`çœ7={×mÃ/¢˜ZÚòK…G½¥b„’G AãÜœ*í¯Ã¿ IoæI¦NU8‘RwÈã;·€ Û×ëÒ”1Y
•£E»ÿ Oyto¢<£Áö·šï,䉧ûA¼sû»Nò}¹üE{ÜÖªò1’õÞr0â}ÎØ#>à/8ïéÎ~—áÍ#ñÎlí§³2f'h”?C÷YËdð:qëõÓ·‚ïeÄ©
ÔÈØÜRL+žAÎ3¼g=åšó³Œt3
ÑQ¦ùRÙßE®¼±w_;þhš’Sirÿ ^ˆã¼iੇ|RòO„m°J/“$·l“ ÇÓ¿ÿ [ÑŠÆ“„†Õø>cFÆ6Ø1ƒ– àz7Ldòxäüwá‹ÝAXùO•Úý’é®ähm •NÀ±ÌTÈç
ƒ‘I$pGž:‚ÄbêW¢®œ´|¦nÍ>¶ÖÏ¢§ÎÜ¢ºö¹•%ÄqL^öÛKpNA<ã¡ …î==ª¸óffËF‡yÌcÉ ©ç$ð=ñÏYþÊ’Ú]—¥‚¬‚eDïÎH>Ÿ_ÌTP™a‰ch['çÆÜò7a‡?w°Ïn§âÎ5”’¨¹uÚÛ|´ÓÓc§{O—ü1•ªxsÃZ…ÊÏy¡Ã3¸Ë2Èé» ‘ƒÎ äžÜðA§cáOéúÛ4ý5-fŒï„ù¬ûô.Ç Üsž•Ò¾•wo<¶Ÿ"¬¡º|£
î2sÇ¡éE²ÉFѱrU°dÜ6œ¨ mc†Îxë׺Þ'0²¡Rr„{j¾í·è›µ÷)º·å–‹î2|I®Y¼ºÍË·–ÃÆàã£'óÆxƒOÆÞ&>\lóÌxP Xc¸ì Sþ5§qà/ê>#žÞW¸if$\3 ® ûÄ“ùŽÕê¾ð<Ó‹H¶óÏ" å·( á‘€:ã†8Ï=+ꨬUA×ÃËÚT’ÑÞöù¥¢]{»ms¥F0\ÑÕ—ô}&ÛB´ƒOŽÚ+›xíÄÀ1
,v± žIëíZ0ǧ™3í2®0ทp9öÝÔž)ÓZËoq/Ú“‘L ²ŒmùŽï‘Ó9§[Û#Ä‘\ÞB¬Çs [;à à«g‚2ôòªœÝV§»·¯/[uó½õÛï¾
/šÍ}öüÿ «=x»HŸÂÞ.™ ÌQùŸh´‘#a$‚'¡u<Š›Æ>2>+ƒLSiöwµFó1!eg`£åœ ÷ëÛö}Á¿ÛVÙêv $¬ƒ|,s÷z€ð΃¨x÷ÅD\ÜŒÞmåÔ„ ˆ o| :{ÇÓ¶–òÁn!´0Ål€, ƒ ( ÛŒŒc¶rsšæ,4‹MÛOH!@¢ ÇŽ„`å²9ÝÃw;AÍt0®¤¡…¯ØÄ.Àìí´ƒ‘ßñ5Í,Óëu-ÈÔc¢KÃÓ£òÖ̺U.õL¯0…%2È—"~x
‚[`có±nHàŽyàö™¥keˆìŒÛFç{(Ø©†`Jã#Žwg<“:ÚÉ;M
^\yhûX‡vB·÷zrF?§BÊÔ/s<ÐÈB)Û± ·ÍÔwç5Âã:så§e{mѤï«Òíh—]Wm4âí¿ùþW4bC3¶ª¾Ùr$pw`àädzt!yŠI„hÂîàM)!edŒm'æ>Ç?wzºKìcŒ´¯Ìq6fp$)ãw¡éUl`µ»ARAˆÝÕgr:äŒgƒéé[Ôö±”iYs5Ýï«ÙG—K=þF’æMG«óÿ `ŠKɦuOQ!ÕåŒ/ÎGÞ`@ËqÕzdõâ«Ê/Ö(ƒK´%ŽbMüåÜŸö—>¤óŒŒV‘°„I¢Yž#™¥ùÏÊ@8
œgqöö5ª4vד[¬(q cò¨À!FGaÁõõ¯?§†¥ÏU½í¿WªZ$úyú½Žz×§Éþ?>Ã×È•6°{™™ŽÙ.$`ÎUœ…çè ' ¤r$1Ø(y7 ðV<ž:È ÁÎMw¾Â'Øb§øxb7gãО½óÉÊë²,i„Fȹ£§8ãä½k¹¥¦ê/ç{ïê驪2œ/«ü?¯Ô›ìñÜ$þeýœRIåŒg9Ác’zrrNO bÚi¢
ѺË/$,“ª¯Ýä;Œ× ´<ÛÑn³IvŸb™¥ nm–ÄŸ—nÝÀãŽ3ëÍG,.öó³˜Ù£¹uÊÌrŠ[<±!@Æ:c9ÅZh
ì’M5ÄìÌ-‚¼ëÉùqŽGì9¬á ;¨A-ž—évþÖ–^ON·Ô”ŸEý}ú×PO&e[]ÒG¸˜Ûp ƒÃà/Ë·8ûÀ€1ž@¿ÚB*²¼ñì8@p™8Q“žÆH'8«I-%¸‚
F»“åó6°Uù|¶Ú¸ã ò^Äw¥ŠÖK–1ÜÝK,Žddlí²0PÀü“×ükG…¯U«·¶–´w¶ŽÍ¾©yÞú[Zös•¯Á[™6°
¨¼ÉVæq·,#
ìãï‘×8îry®A››¨,ãc66»Ë´ã'æÉù?t}¢æH--Òá"›|ˆ¬[í 7¶ö#¸9«––‹$,+Ëqœ\Êøc€yê^ݸÄa°«™B-9%«×®‹V´w~vÜTéꢷþ¼ˆ%·¹• ’[xç•÷2gØS?6åÀÚ õ9É#š@÷bT¸º²C*3Bá¤òÎA9 =úU§Ó"2Ãlá0iÝIc‚2Î@%öç94ùô»'»HÄ¥Ô¾@à Tp£šíx:úÊ:5eºßMý×wµ›Ó_+šº3Ýyvÿ "ºÇ<ÂI>Õ1G·Ë«È«É# àÈÇ øp Jv·šæDûE¿›†Ë’NFr2qŸ½ÇAÜšu•´éí#Ħ8£2”Ú2Ã/€[ÎTr;qŠz*ý’Îþ(≠;¡TÆâ›;ºÿ àçœk‘Þ8¾Uª¾íé{^×IZéwÓkXÉûÑZo¯_øo×È¡¬ â–ÞR§2„‚Àœü½ùç® SVa†Âüª¼±D‘ŒísŸàä|ä2 æ[‹z”¯s{wn„ÆmáóCO+†GO8Ïeçåº`¯^¼ðG5f{Xžä,k‰<á y™¥voÆ éÛõëI=œ1‹éíÔÀÑ)R#;AÂncäŽ:tÏ#¶TkB.0Œ-ÖÞZÛgumß}fÎJÉ+#2êÔP£žùÈÅi¢%œ3P*Yƒò‚A쓎2r:ƒÐúñiRUQq‰H9!”={~¼“JŽV¥»×²m.ÛߺiYl¾òk˜gL³·rT•
’…wHÁ6ä`–Î3ùÌ4Øe³†&òL‘•%clyîAÂäà0 žüç$[3uŘpNOÀÉ=† cï{rYK
ååä~FÁ
•a»"Lär1Ó¯2Äõæ<™C•.fÕ»è¥~½-¿g½Â4¡{[ør¨¶·Žõäx¥’l®qpwÇ»8ärF \cޏܯÓ-g‚yciÏÀ¾rÎwèØÈ#o°Á9ã5¢šfÔxÞæfGusÏÌJÿ µ×œ/LtãÅT7²¶w,l
ɳ;”eúà·¨çîŒsÜgTÃS¦^ '~‹®›¯+k÷ZÖd©Æ*Ó[Ü«%Œk0ŽXƒ”$k#Ȩ P2bv‘ƒŸáÇ™ÆÕb)m$É*8óLE‘8'–ÜN Úyàúô+{uº±I'wvš4fÜr íì½=úuú
sFlìV$‘ö†HÑù€$§ õ=½¸«Ž]
:Ž+•¦ïmRþ½l´îÊT#nkiøÿ _ðÆT¶7Ò½ºÒ£Î¸d\ã8=yãŽÜäR{x]ZâÚé#¸r²#»ÎHÆ6õ ç® ÎFkr;sºÄ.&;só±Ç9êH÷ýSšÕtÐU¢-n Ì| vqœ„{gŒt§S.P‹’މ_[;m¥ÞZýRûÂX{+¥úü¼ú•-àÓ7!„G"“´‹žƒnrYXã¸îp éœ!ÓoPÌtÑ (‰Þ¹é€sÓ#GLçÕšÑnJý¡!‘Tä#“ß?îýp}xÇ‚I¥Õn#·¸–y'qó@r[ Êô÷<ÔWÃÓ¢áN¥4Ô’I&ݼ¬¬¼ÞºvéÆ
FQV~_ÒüJÖÚt¥¦Xá3BÄP^%ÈÎW-×c¡ú©¤·Iþèk¥š?–UQåIR[’O 5x\ÉhÆI¶K4«2ùªŠŒ<¼óœçØ`u«‚Í.VHä€ Ëgfx''9ÆI#±®Z8
sISºku¢ßÞ]úk»Jößl¡B.Ü»ÿ MWe
°·Ž%šêɆ¼»Âù³´œ O¿cÐÓÄh©"ÛÜÏ.ÖV’3nüÄmnq[ŒòznšÖ>J¬òˆæ…qýØP Ž:ä7^0yëWšÍ_79äoaÈ °#q0{ää×mœy”R{vÒÞ¶ÚÏe¥“ÚÆÐ¥Ì®—õýjR •íç›Ìb„+JyÜØÙ•Ç]¿Ôd þËOL²”9-Œ—õÃc'æÝלçÚ²ìejP“½
âù°¨†ðqòädЃÉäÖÜj÷PÇp“ÍšŠå«‘î
<iWNsmª»¶vÓz5»ûì:Rs\Ðßôû×uÔÿÙ