Commits

Gustavo Picon committed b27cf77

making the latest version of pep8.py happy

Comments (0)

Files changed (12)

 # Sphinx build info version 1
 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 4702369698cd000d34fde9c8155e9cf5
+config: 667b97e8fd7a1c34d350e43d2f86f81d
 tags: fbb0d17656682115ca4d033fb2f83ba1

docs/_static/basic.css

     background-color: #ffa
 }
 
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
 /* -- code displays --------------------------------------------------------- */
 
 pre {
     div.document,
     div.documentwrapper,
     div.bodywrapper {
-        margin: 0;
+        margin: 0 !important;
         width: 100%;
     }
 

docs/_static/default.css

     background-color: #ecf0f3;
     padding: 0 1px 0 1px;
     font-size: 0.95em;
+}
+
+.warning tt {
+    background: #efc2c2;
+}
+
+.note tt {
+    background: #d6d6d6;
 }
 # other places throughout the built documents.
 #
 # The short X.Y version.
-version = '2.0'
+version = '2.1a'
 # The full version, including alpha/beta/rc tags.
-release = '2.0'
+release = '2.1a'
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:

docs/genindex.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Index &mdash; numconv v2.0 documentation</title>
+    <title>Index &mdash; numconv v2.1a 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.0',
+        URL_ROOT:    '#',
+        VERSION:     '2.1a',
         COLLAPSE_MODINDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="top" title="numconv v2.0 documentation" href="index.html" /> 
+    <link rel="top" title="numconv v2.1a documentation" href="index.html" /> 
   </head>
   <body>
     <div class="related">
       <h3>Navigation</h3>
       <ul>
         <li class="right" style="margin-right: 10px">
-          <a href="" title="General Index"
+          <a href="#" title="General Index"
              accesskey="I">index</a></li>
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              accesskey="M">modules</a> |</li>
-        <li><a href="index.html">numconv v2.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">numconv v2.1a documentation</a> &raquo;</li> 
       </ul>
     </div>  
 
       <h3>Navigation</h3>
       <ul>
         <li class="right" style="margin-right: 10px">
-          <a href="" title="General Index"
+          <a href="#" title="General Index"
              >index</a></li>
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              >modules</a> |</li>
-        <li><a href="index.html">numconv v2.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">numconv v2.1a documentation</a> &raquo;</li> 
       </ul>
     </div>
     <div class="footer">
       &copy; Copyright 2008-2009, Gustavo Picon.
-      Last updated on Dec 14, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
+      Last updated on Apr 05, 2010.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
     </div>
   </body>
 </html>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>numconv — flexible numeric conversion for python &mdash; numconv v2.0 documentation</title>
+    <title>numconv — flexible numeric conversion for python &mdash; numconv v2.1a 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.0',
+        URL_ROOT:    '#',
+        VERSION:     '2.1a',
         COLLAPSE_MODINDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="top" title="numconv v2.0 documentation" href="" /> 
+    <link rel="top" title="numconv v2.1a documentation" href="#" /> 
   </head>
   <body>
     <div class="related">
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              accesskey="M">modules</a> |</li>
-        <li><a href="">numconv v2.0 documentation</a> &raquo;</li> 
+        <li><a href="#">numconv v2.1a documentation</a> &raquo;</li> 
       </ul>
     </div>  
 
 </tr>
 <tr class="field"><th class="field-name">license:</th><td class="field-body">Apache License 2.0</td>
 </tr>
-<tr class="field"><th class="field-name">version:</th><td class="field-body">2.0</td>
+<tr class="field"><th class="field-name">version:</th><td class="field-body">2.1a</td>
 </tr>
 <tr class="field"><th class="field-name">url:</th><td class="field-body"><a class="reference external" href="http://code.tabo.pe/numconv/">http://code.tabo.pe/numconv/</a></td>
 </tr>
 <li><em>radix</em> &#8211; The base that will be used in the conversions.
 The default value is 10 for decimal conversions.</li>
 <li><em>alphabet</em> &#8211; <p>A string that will be used as a encoding alphabet.
-The length of the alphabet can be longer than the radix. In this case
-the alphabet will be internally truncated.</p>
+The length of the alphabet can be longer than the radix. In this
+case the alphabet will be internally truncated.</p>
 <p>The default value is <a title="numconv.BASE85" class="reference internal" href="#numconv.BASE85"><tt class="xref docutils literal"><span class="pre">numconv.BASE85</span></tt></a></p>
 </li>
 </ul>
       </div>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
-            <h3><a href="">Table Of Contents</a></h3>
+            <h3><a href="#">Table Of Contents</a></h3>
             <ul>
-<li><a class="reference external" href=""><tt class="docutils literal"><span class="pre">numconv</span></tt> &#8212; flexible numeric conversion for python</a><ul>
+<li><a class="reference external" href="#"><tt class="docutils literal"><span class="pre">numconv</span></tt> &#8212; flexible numeric conversion for python</a><ul>
 <li><a class="reference external" href="#numconv">numconv</a><ul>
 <li><a class="reference external" href="#constants">constants</a></li>
 <li><a class="reference external" href="#functions">functions</a></li>
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              >modules</a> |</li>
-        <li><a href="">numconv v2.0 documentation</a> &raquo;</li> 
+        <li><a href="#">numconv v2.1a documentation</a> &raquo;</li> 
       </ul>
     </div>
     <div class="footer">
       &copy; Copyright 2008-2009, Gustavo Picon.
-      Last updated on Dec 14, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
+      Last updated on Apr 05, 2010.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
     </div>
   </body>
 </html>

docs/modindex.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Global Module Index &mdash; numconv v2.0 documentation</title>
+    <title>Global Module Index &mdash; numconv v2.1a 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.0',
+        URL_ROOT:    '#',
+        VERSION:     '2.1a',
         COLLAPSE_MODINDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="top" title="numconv v2.0 documentation" href="index.html" />
+    <link rel="top" title="numconv v2.1a documentation" href="index.html" />
  
 
     <script type="text/javascript">
           <a href="genindex.html" title="General Index"
              accesskey="I">index</a></li>
         <li class="right" >
-          <a href="" title="Global Module Index"
+          <a href="#" title="Global Module Index"
              accesskey="M">modules</a> |</li>
-        <li><a href="index.html">numconv v2.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">numconv v2.1a documentation</a> &raquo;</li> 
       </ul>
     </div>  
 
           <a href="genindex.html" title="General Index"
              >index</a></li>
         <li class="right" >
-          <a href="" title="Global Module Index"
+          <a href="#" title="Global Module Index"
              >modules</a> |</li>
-        <li><a href="index.html">numconv v2.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">numconv v2.1a documentation</a> &raquo;</li> 
       </ul>
     </div>
     <div class="footer">
       &copy; Copyright 2008-2009, Gustavo Picon.
-      Last updated on Dec 14, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
+      Last updated on Apr 05, 2010.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
     </div>
   </body>
 </html>
 # Sphinx inventory version 1
 # Project: numconv
-# Version: 2.0
+# Version: 2.1a
 numconv mod index.html
 numconv.int2str function index.html
 numconv.BASE85 data index.html
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Search &mdash; numconv v2.0 documentation</title>
+    <title>Search &mdash; numconv v2.1a 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.0',
+        URL_ROOT:    '#',
+        VERSION:     '2.1a',
         COLLAPSE_MODINDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/searchtools.js"></script>
-    <link rel="top" title="numconv v2.0 documentation" href="index.html" /> 
+    <link rel="top" title="numconv v2.1a documentation" href="index.html" /> 
   </head>
   <body>
     <div class="related">
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              accesskey="M">modules</a> |</li>
-        <li><a href="index.html">numconv v2.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">numconv v2.1a documentation</a> &raquo;</li> 
       </ul>
     </div>  
 
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              >modules</a> |</li>
-        <li><a href="index.html">numconv v2.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">numconv v2.1a documentation</a> &raquo;</li> 
       </ul>
     </div>
   
     <div class="footer">
       &copy; Copyright 2008-2009, Gustavo Picon.
-      Last updated on Dec 14, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
+      Last updated on Apr 05, 2010.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
     </div>
   <script type="text/javascript" src="searchindex.js"></script>
 
            strings.
 :copyright: 2008-2009 by Gustavo Picon
 :license: Apache License 2.0
-:version: 2.0
+:version: 2.1a
 :url: http://code.tabo.pe/numconv/
 :documentation:
    `numconv-docs
 """
 
 
-__version__ = '2.0.0'
+__version__ = '2.1.0a'
 
 # from april fool's rfc 1924
 BASE85 = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' \
 
 class NumConv(object):
     """Class to create converter objects.
-    
+
         :param radix: The base that will be used in the conversions.
            The default value is 10 for decimal conversions.
         :param alphabet: A string that will be used as a encoding alphabet.
-           The length of the alphabet can be longer than the radix. In this case
-           the alphabet will be internally truncated.
-    
+           The length of the alphabet can be longer than the radix. In this
+           case the alphabet will be internally truncated.
+
            The default value is :data:`numconv.BASE85`
-        
+
         :raise TypeError: when *radix* isn't an integer
         :raise ValueError: when *radix* is invalid
         :raise ValueError: when *alphabet* has duplicated characters
     """
-    
+
     def __init__(self, radix=10, alphabet=BASE85):
         "basic validation and cached_map storage"
         if int(radix) != radix:
 
     def int2str(self, num):
         """Converts an integer into a string.
-    
+
         :param num: A numeric value to be converted to another base as a
                     string.
-    
-    
+
+
         :rtype: string
-    
+
         :raise TypeError: when *num* isn't an integer
         :raise ValueError: when *num* isn't positive
-    
+
         **Examples** (taken from :file:`tests.py`):
-    
+
            3735928559 to hexadecimal::
-    
+
                >> NumConv(16).int2str(3735928559)
                'DEADBEEF'
-    
+
            19284 to binary::
-    
+
                >> NumConv(2).int2str(19284)
                '100101101010100'
-    
+
            37 to base 4 using a custom dictionary::
-    
+
                >> NumConv(4, 'rofl').int2str(37)
                'foo'
-    
+
            Very large number to :data:`~numconv.BASE85`::
-    
+
                >> NumConv(85).int2str(2693233728041137L)
                '~123AFz@'
-    
+
         """
         if int(num) != num:
             raise TypeError('number must be an integer')
                 break
             num //= radix
         return ret
-    
-    
+
     def str2int(self, num):
         """Converts a string into an integer.
-    
+
         If possible, the built-in python conversion will be used for speed
         purposes.
-    
+
         :param num: A string that will be converted to an integer.
-    
+
         :rtype: integer
-    
+
         :raise ValueError: when *num* is invalid
-    
+
         **Examples** (taken from :file:`tests.py`):
-    
+
            Hexadecimal 'DEADBEEF' to integer::
-    
+
               >> NumConv(16).str2int('DEADBEEF')
               3735928559L
-    
+
            Binary '100101101010100' to integer::
-    
+
                >> NumConv(2).str2int('100101101010100')
                19284
-    
+
            Base 4 with custom encoding 'foo' to integer::
-    
+
                >> NumConv(4, 'rofl').str2int('foo')
                37
-    
+
            :data:`~numconv.BASE85` '~123AFz@' to integer::
-    
+
                >> NumConv(85).str2int('~123AFz@')
                2693233728041137L
-    
+
         """
         radix, alphabet = self.radix, self.alphabet
         if radix <= 36 and alphabet[:radix].lower() == BASE85[:radix].lower():
     "helper for quick base conversions from integers to strings"
     return NumConv(radix, alphabet).int2str(num)
 
+
 def str2int(num, radix=10, alphabet=BASE85):
     "helper for quick base conversions from strings to integers"
     return NumConv(radix, alphabet).str2int(num)
-
 import os
 from distutils.core import setup
 
-version = '2.0'
+version = '2.1a'
 
 classifiers = [
     "Development Status :: 5 - Production/Stable",
 ]
 
 root_dir = os.path.dirname(__file__)
-long_desc = open((root_dir if root_dir else '.')+'/README').read()
+long_desc = open((root_dir if root_dir else '.') + '/README').read()
 
 setup(
     name='numconv',
         """sanity check: testing a large interval and lots of radixes"""
         for radix in range(2, len(BASE85)):
             ncobj = NumConv(radix)
-            for num in range(1000) + [10**x for x in range(5, 15)]:
+            for num in range(1000) + [10 ** x for x in range(5, 15)]:
                 self.assertEqual(num, ncobj.str2int(ncobj.int2str(num)))
 
 if __name__ == "__main__":