no `None` default for `saqc._wrap.inner` arguments `to_mask` and `flag`
we could provide a custom None like so
class UnsetType:
instance = None
def __new__(cls):
if cls.instance is None:
cls.instance = super().__new__(cls)
return cls.instance
def __bool__(self):
return False
Unset = UnsetType()
and use it as so:
def foo(arg: UnsetType | None | int = Unset)
if arg is Unset:
arg = 10 # arg was not given
if arg is None:
arg = 12 # arg was set to None by user
...
Edited by Bert Palm