Files
FastAnime/fastanime/cli/utils/tools.py
2024-08-05 09:47:00 +03:00

14 lines
401 B
Python

class QueryDict(dict):
"""dot.notation access to dictionary attributes"""
def __getattr__(self, attr):
try:
return self.__getitem__(attr)
except KeyError:
raise AttributeError(
"%r object has no attribute %r" % (self.__class__.__name__, attr)
)
def __setattr__(self, attr, value):
self.__setitem__(attr, value)