MCPcopy Index your code
hub / github.com/RustPython/RustPython / __setattr__

Method __setattr__

Lib/test/test_class.py:704–708  ·  view source on GitHub ↗
(self, name, value)

Source from the content-addressed store, hash-verified

702 __slots__ = ("y",)
703
704 def __setattr__(self, name, value) -> None:
705 if name == "z":
706 super().__setattr__("y", 1)
707 else:
708 super().__setattr__(name, value)
709
710 error_msg = "'A' object has no attribute 'x'"
711 with self.assertRaisesRegex(AttributeError, error_msg):

Callers 2

Calls 1

superClass · 0.85

Tested by

no test coverage detected