PEP 522: add missing "return" in example

This commit is contained in:
ncoghlan 2016-06-21 18:57:03 -07:00 committed by GitHub
parent 914dfa153e
commit 8a4f6c8005
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ can be updated to use the ``random`` module as a fallback option::
try: try:
return os.urandom(num_bytes) return os.urandom(num_bytes)
except BlockingIOError: except BlockingIOError:
random.getrandbits(num_bytes*8).to_bytes(num_bytes, "little") return random.getrandbits(num_bytes*8).to_bytes(num_bytes, "little")
Depending on the application, it may also be appropriate to skip accessing Depending on the application, it may also be appropriate to skip accessing
``os.urandom`` at all, and instead rely solely on the ``random`` module. ``os.urandom`` at all, and instead rely solely on the ``random`` module.