add __contains__
This commit is contained in:
parent
af3d569ee9
commit
8e1237f90c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user