mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Avoid __file__
in hashlib
example (GH-134540)
This commit is contained in:
parent
ad42dc1909
commit
9b292ff022
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue