diff options
author | Guido van Rossum <guido@python.org> | 2001-08-31 04:35:14 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-31 04:35:14 (GMT) |
commit | bfa47b072542ea17ce478572d202b8ef60120737 (patch) | |
tree | e03694343ecbd9a94ab927d1745fa658d7941b48 | |
parent | 41eb14dffab5c5b559028f062d209b5cde8224f4 (diff) | |
download | cpython-bfa47b072542ea17ce478572d202b8ef60120737.zip cpython-bfa47b072542ea17ce478572d202b8ef60120737.tar.gz cpython-bfa47b072542ea17ce478572d202b8ef60120737.tar.bz2 |
Correct name mangling algorithm, and add a comment.
-rw-r--r-- | Lib/test/test_descr.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index f79af4d..f495a37 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: |