Avoid __file__ in hashlib example (GH-134540)

This commit is contained in:
Josh Cannon 2025-05-22 16:32:00 -05:00 committed by GitHub
parent ad42dc1909
commit 9b292ff022
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -284,7 +284,7 @@ a file or file-like object.
Example:
>>> import io, hashlib, hmac
>>> with open(hashlib.__file__, "rb") as f:
>>> with open("library/hashlib.rst", "rb") as f:
... digest = hashlib.file_digest(f, "sha256")
...
>>> digest.hexdigest() # doctest: +ELLIPSIS