mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323)
https://bugs.python.org/issue35119
This commit is contained in:
parent
6531bf6309
commit
0bee3c36d4
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue