From: Guido van Rossum Date: Fri, 31 Aug 2001 04:35:14 +0000 (+0000) Subject: Correct name mangling algorithm, and add a comment. X-Git-Tag: v2.2a3~181 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfa47b072542ea17ce478572d202b8ef60120737;p=thirdparty%2FPython%2Fcpython.git Correct name mangling algorithm, and add a comment. --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index f79af4d8c053..f495a3728d9a 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -432,10 +432,9 @@ def metaclass(): dict["__dynamic__"] = 1 cls = super(autosuper, metaclass).__new__(metaclass, name, bases, dict) + # Name mangling for __super removes leading underscores while name[:1] == "_": name = name[1:] - while name[-1:] == "_": - name = name[:-1] if name: name = "_%s__super" % name else: