]> granicus.if.org Git - python/commitdiff
Correct name mangling algorithm, and add a comment.
authorGuido van Rossum <guido@python.org>
Fri, 31 Aug 2001 04:35:14 +0000 (04:35 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 31 Aug 2001 04:35:14 +0000 (04:35 +0000)
Lib/test/test_descr.py

index f79af4d8c0537be95a1bb82ed18d6d9b126a5792..f495a3728d9ae1b3b97f3c76e991d5662930a6ad 100644 (file)
@@ -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: