Make the pseudocode more accurate.

This commit is contained in:
Barry Warsaw 2017-10-02 18:03:33 -04:00
parent bede39a536
commit 7327e61411
1 changed files with 3 additions and 2 deletions

View File

@ -163,8 +163,9 @@ feature looks roughly like the following::
# In builtins.
def breakpoint(*args, **kws):
import sys
hook = getattr(sys, 'breakpointhook', None)
if hook is None:
missing = object()
hook = getattr(sys, 'breakpointhook', missing)
if hook is missing:
raise RuntimeError('lost sys.breakpointhook')
return hook(*args, **kws)