]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-35119: Fix RecursionError in example of customizing module attribute access....
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 6 Nov 2018 01:59:15 +0000 (17:59 -0800)
committerGitHub <noreply@github.com>
Tue, 6 Nov 2018 01:59:15 +0000 (17:59 -0800)
https://bugs.python.org/issue35119
(cherry picked from commit 0bee3c36d406e47fa9f99cfc1e07b701512c4f3f)

Co-authored-by: Denis Osipov <osipov_d@list.ru>
Doc/reference/datamodel.rst

index 2012d7abc23f885e0770778dd1bdb99839f6b944..be9b3ad1af69cd4caa499366227ea6330d3aa4aa 100644 (file)
@@ -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