1class HauntedMansion:
2
3 def __init__(self, **kwargs):
4 [setattr(self, *attr) for attr in kwargs.items()]
5
6 def __setattr__(_, name, value):
7 super().__setattr__(f'spooky_{name}', value)
8
9 def __getattr__(self, _):
10 return "Booooo, only ghosts here!"
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK