Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit9b292ff

Browse files
authored
Avoid__file__ inhashlib example (GH-134540)
1 parentad42dc1 commit9b292ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Doc/library/hashlib.rst

Lines 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-
>>>withopen(hashlib.__file__,"rb")as f:
287+
>>>withopen("library/hashlib.rst","rb")as f:
288288
...digest= hashlib.file_digest(f,"sha256")
289289
...
290290
>>>digest.hexdigest()# doctest: +ELLIPSIS

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp