diff options
author | Denis Osipov <osipov_d@list.ru> | 2018-11-06 01:53:21 (GMT) |
---|---|---|
committer | Ivan Levkivskyi <levkivskyi@gmail.com> | 2018-11-06 01:53:21 (GMT) |
commit | 0bee3c36d406e47fa9f99cfc1e07b701512c4f3f (patch) | |
tree | ac262a6926519711dd7389e119ced4d6b17563f1 /Doc/reference | |
parent | 6531bf6309c8fda1954060a0fb5ea930b1efb656 (diff) | |
download | cpython-0bee3c36d406e47fa9f99cfc1e07b701512c4f3f.zip cpython-0bee3c36d406e47fa9f99cfc1e07b701512c4f3f.tar.gz cpython-0bee3c36d406e47fa9f99cfc1e07b701512c4f3f.tar.bz2 |
bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323)
https://bugs.python.org/issue35119
Diffstat (limited to 'Doc/reference')
-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 6067c72..24c647d 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 |