https://github.com/python/cpython/commit/9b292ff0223dab0f999d5c1e13355552fd7cd528
commit: 9b292ff0223dab0f999d5c1e13355552fd7cd528
branch: main
author: Josh Cannon <[email protected]>
committer: gpshead <[email protected]>
date: 2025-05-22T14:32:00-07:00
summary:

Avoid `__file__` in `hashlib` example (GH-134540)

files:
M Doc/library/hashlib.rst

diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst
index bb2d2fad23bdb8..4818a4944a512a 100644
--- a/Doc/library/hashlib.rst
+++ b/Doc/library/hashlib.rst
@@ -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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to