[docs] http://docs.python.org/2/library/hashlib.html

Zachary Ware zachary.ware at gmail.com
Sun Nov 18 17:22:00 CET 2012

On Thu, Nov 8, 2012 at 6:57 AM, Hugh Parker <hcp at pobox.com> wrote:
> http://docs.python.org/2/library/hashlib.html has an error:
> m.update("Blah") doesn't work.  It gives a type error.  To work, it needs to
> be m.update("Blah".encode('utf-8'))
> I'm using Python 3.3.

Hi Hugh,

Please note that while the majority of things are the same between
Python versions, several major changes happened between Python 2 and
Python 3.  The page you linked to is the Python 2.7 version of the
docs, which don't necessarily apply to Python 3.3.  In this case, the
page you referred to is correct for 2.7, and the 3.3 version of the
page is correct for that version.  You can change which version you
are looking at with the version switching dropdown at the top left of
the page.  If you have javascript disabled, you can change the version
by changing the '2' in your link to a '3'.

More information about the docs mailing list