diff options
author | Denis Osipov <osipov_d@list.ru> | 2018-11-06 06:53:21 +0500 |
---|---|---|
committer | Ivan Levkivskyi <levkivskyi@gmail.com> | 2018-11-06 01:53:21 +0000 |
commit | 0bee3c36d406e47fa9f99cfc1e07b701512c4f3f (patch) | |
tree | ac262a6926519711dd7389e119ced4d6b17563f1 | |
parent | 6531bf6309c8fda1954060a0fb5ea930b1efb656 (diff) | |
download | cpython-git-0bee3c36d406e47fa9f99cfc1e07b701512c4f3f.tar.gz |
bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323)
https://bugs.python.org/issue35119
-rw-r--r-- | Doc/reference/datamodel.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 6067c72526..24c647d1a8 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -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 |