This website works better with JavaScript.
Home
Explore
lain.church
Help
Register
Sign In
whut
/
confthing
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
add __contains__
master
whut
1 year ago
parent
af3d569ee9
commit
8e1237f90c
1 changed files
with
6 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
src/confthing/__init__.py
+ 6
- 0
src/confthing/__init__.py
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
Write
Preview
Loading…
Cancel
Save