From: Josh Cannon Date: Thu, 22 May 2025 21:32:00 +0000 (-0500) Subject: Avoid `__file__` in `hashlib` example (GH-134540) X-Git-Tag: v3.15.0a1~1561 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b292ff0223dab0f999d5c1e13355552fd7cd528;p=thirdparty%2FPython%2Fcpython.git Avoid `__file__` in `hashlib` example (GH-134540) --- diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst index bb2d2fad23bd..4818a4944a51 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