mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-25 12:24:52 -08:00
14 lines
401 B
Python
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)
|