I have a class that takes a dict and initialize constructors to set the class members. I am new to Python Object Oriented and I read about __slots__
attributes from here and am wondering if I need to declare __slots__
for my sample class below? If not, what is the best and most pythonic way here?
class MyClass:
__slots__: List[str] = ["tmp_dict"]
def __init__(self, tmp_dict):
self.tmp_dict = tmp_dict