summaryrefslogtreecommitdiff
path: root/Doc/reference/datamodel.rst
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-11-05 17:59:15 -0800
committerGitHub <noreply@github.com>2018-11-05 17:59:15 -0800
commit558dc8adbec0b85e0ff257fcedc85c5d89cd2825 (patch)
treea38a207d54483b98ddcdd517449fbdc1f457b9e1 /Doc/reference/datamodel.rst
parent91a19c923c83471f305e64ca021bee2e9171965e (diff)
downloadcpython-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.rst2
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