From 2ccc5098bc2c8d1dae7f9be8934b799d85857a42 Mon Sep 17 00:00:00 2001 From: Kurt Rose Date: Wed, 16 Oct 2024 17:38:36 -0700 Subject: [PATCH] Sentinel copy return self --- boltons/typeutils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/boltons/typeutils.py b/boltons/typeutils.py index fc25a22..395ce59 100644 --- a/boltons/typeutils.py +++ b/boltons/typeutils.py @@ -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__')