[issue18742] Abstract base class for hashlib
Gregory P. Smith
report at bugs.python.org
Tue Oct 22 22:03:06 CEST 2013
Gregory P. Smith added the comment:
>
> Have you had a chance to read http://www.python.org/dev/peps/pep-0452/ ,
too?
Overall pep 452 looks good but one thing popped out at me:
>>> import hashlib
>>> from Crypto.Hash import MD5
>>> m = MD5.new()
>>> isinstance(m, hashlib.CryptoHash)
True
This suggests that there is an ABC hashlib.CryptoHash that non hashlib
implementations sound use but that is not spelled out anywhere as required
or recommended for third party hash implementations or why using it is a
good thing. I believe that is what you want to do with the ABC being
defined in this issue so I'd mention that explicitly in the pep.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18742>
_______________________________________
More information about the Python-bugs-list
mailing list