diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-05 17:59:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 17:59:15 -0800 |
commit | 558dc8adbec0b85e0ff257fcedc85c5d89cd2825 (patch) | |
tree | a38a207d54483b98ddcdd517449fbdc1f457b9e1 /Doc/reference/datamodel.rst | |
parent | 91a19c923c83471f305e64ca021bee2e9171965e (diff) | |
download | cpython-git-558dc8adbec0b85e0ff257fcedc85c5d89cd2825.tar.gz |
bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323)
https://bugs.python.org/issue35119
(cherry picked from commit 0bee3c36d406e47fa9f99cfc1e07b701512c4f3f)
Co-authored-by: Denis Osipov <osipov_d@list.ru>
Diffstat (limited to 'Doc/reference/datamodel.rst')
-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 2012d7abc2..be9b3ad1af 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 |