Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 06a3a85

Browse filesBrowse files
[3.14] Avoid __file__ in hashlib example (GH-134540) (#134549)
Avoid `__file__` in `hashlib` example (GH-134540) (cherry picked from commit 9b292ff) Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
1 parent 37c2c8c commit 06a3a85
Copy full SHA for 06a3a85

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎Doc/library/hashlib.rst

Copy file name to clipboardExpand all lines: Doc/library/hashlib.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ a file or file-like object.
284284
Example:
285285

286286
>>> import io, hashlib, hmac
287-
>>> with open(hashlib.__file__, "rb") as f:
287+
>>> with open("library/hashlib.rst", "rb") as f:
288288
... digest = hashlib.file_digest(f, "sha256")
289289
...
290290
>>> digest.hexdigest() # doctest: +ELLIPSIS

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.