Clarify secrets.token_urlsafe() removes Base64 padding

This commit is contained in:
Matt Baker 2020-06-16 13:43:53 +01:00 committed by GitHub
parent e0bec69854
commit 07b616e04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -89,8 +89,9 @@ hard-to-guess URLs, and similar.
Return a random URL-safe text string, containing *nbytes* random
bytes. The text is Base64 encoded, so on average each byte results
in approximately 1.3 characters. If *nbytes* is ``None`` or not
supplied, a reasonable default is used.
in approximately 1.3 characters. All Base64 padding (=) is removed.
If *nbytes* is ``None`` or not supplied, a reasonable default is
used.
.. doctest::