<font face="courier new,monospace">This commit makes several significant changes to this<br>file. Overall, the desire was to aid compliance with<br>PEP-0257. Along the way, a number of other possible<br>enhancements were noted.<br>
<br>Changes include<br>  - encoding declaration<br>  - module docstrings<br>  - function docstrings<br>  - minor changes to functions<br>  - whitespace removal<br><br>Module docstring<br>  - added<br><br>Function docstrings<br>
  - have been made much more verbose<br><br>Docstrings remain available to gettext. I have changed the<br>pattern from:<br><br>  def spam(eggs):<br>      return eggs.with_spam()<br>  spam.__doc__ = gettext(&#39;Comments here&#39;)<br>
<br>to:<br><br>  def spam(eggs):<br>      &quot;&quot;&quot;<br>      comments here<br>      &quot;&quot;&quot;<br>      return eggs.with_spam()<br>  spam.__doc__ = gettext(spam.__doc__)<br><br>In order to keep with the theme of allowing the docstrings<br>
to be educational, I have included links to the English<br>Wikipedia where appropriate (and where it was easy for me to<br>do.)<br><br>Doctests now cover most of the non-trival problems, such as<br>direct calls thorough to Python&#39;s math module. Test coverage<br>
has moved from 0% to ~50%.<br><br>Function changes<br>  -  ceil()<br>      - now returns integer as described in<br>        function&#39;s documentation<br>  -  _do_gcd(a, b)<br>      - removed reference to &quot;self&quot;,<br>
        given that the function is not in a class<br>  -  gcd(self, a, b)<br>      - removed reference to &quot;self&quot;, given that<br>        the function is not in a class<br>      - changed ValueError to TypeError<br>
      - added helpful exception message<br>  -  factorial<br>      - removed gettext from exception<br>      - changed ValueError to TypeError<br>  -  factorize<br>      - added option to return a list of factors<br>      - kept defaults to string representation<br>
        for backwards compatibility<br>      - non-integers now raise a TypeError, rather<br>        than returning 0<br>  -  fac<br>      - now indicates that it is an alias of<br>        factorial in its docstring<br>  -  floor<br>
      - now returns int as per documentation<br>      - removed float type coercion for values being sent to math.floor()<br>  -  mod<br>      - changed ValueError to TypeError<br>  -  round<br>      - returns an integer as per function&#39;s documentation<br>
  -  shift_left &amp; shift_right<br>      - ValueError to TypeError<br>  -  sqrt<br>      - removed type coercion, after 100,000 tests,<br>        results were equivalent without it</font><br>