Commit 0bee3c36 authored by Denis Osipov's avatar Denis Osipov Committed by Ivan Levkivskyi

bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323)

https://bugs.python.org/issue35119
parent 6531bf63
......@@ -1580,7 +1580,7 @@ a module object to a subclass of :class:`types.ModuleType`. For example::
def __setattr__(self, attr, value):
print(f'Setting {attr}...')
setattr(self, attr, value)
super().__setattr__(attr, value)
sys.modules[__name__].__class__ = VerboseModule
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment