Sentinel copy return self

This commit is contained in:
Kurt Rose 2024-10-16 17:38:36 -07:00 committed by Mahmoud Hashemi
parent d463c60587
commit 2ccc5098bc
1 changed files with 6 additions and 0 deletions

View File

@ -88,6 +88,12 @@ def make_sentinel(name='_MISSING', var_name=None):
def __bool__(self):
return False
def __copy__(self):
return self
def __deepcopy__(self):
return self
if var_name:
frame = sys._getframe(1)
module = frame.f_globals.get('__name__')