This question doesn't fit SO as currently written. German text aside, asking "is this code correct" is usually off-topic as long as it works to the best of your knowledge. Such questions could be answered on CodeReview SE. Consider also formatting your snippet with black or ruff prior to posting as the current layout is overly sparse and difficult to read. However, I doubt it's answerable there too:
__getattribute__
cannot be implemented completely in python. Your func should behave close to that, but it defers to
object.__getattribute__
, which feels like cheating... —
STerliakov just now