add __contains__

This commit is contained in:
whut 2022-10-09 19:02:36 -05:00
parent af3d569ee9
commit 8e1237f90c

View File

@ -68,3 +68,9 @@ class Config:
def __setitem__(self, path, value):
self.set(path, value, self.clobber_subscript)
def __contains__(self, path):
try:
self.get(path, strict=True)
return True
except:
return False