add CaseInsensitiveDict.__contains__

This commit is contained in:
jesopo 2019-06-26 17:57:49 +01:00
parent 16d331dd43
commit 3c3f0449b6

View file

@ -231,6 +231,8 @@ class CaseInsensitiveDict(dict):
return dict.__getitem__(self, key.lower()) return dict.__getitem__(self, key.lower())
def __setitem__(self, key: str, value: typing.Any) -> typing.Any: def __setitem__(self, key: str, value: typing.Any) -> typing.Any:
return dict.__setitem__(self, key.lower(), value) return dict.__setitem__(self, key.lower(), value)
def __contains__(self, key: str):
return dict.__contains__(self, key.lower())
def is_ip(s: str) -> bool: def is_ip(s: str) -> bool:
try: try: