Does hashlib support a file mode?

Andrew Berg bahamutzero8825 at gmail.com
Wed Jul 6 15:42:30 EDT 2011


On 2011.07.06 02:07 PM, Phlip wrote:
> If I call m = md5() twice, I expect two objects.
You get two objects because you make the function run again. Of course,
the first one is garbage collected if it doesn't have another reference.

>>> m1 = hashlib.md5()
>>> m2 = hashlib.md5()
>>> m1 is m2
False

Are you assuming Python acts like another language or is there something
confusing in the docs or something else?



More information about the Python-list mailing list