summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-12-03 15:38:28 +0000
committerGuido van Rossum <guido@python.org>2001-12-03 15:38:28 +0000
commit5b443c6282e8ffd6873005b62c50e56fa149e277 (patch)
treead424630007b688380534e7d2181a59aba44c8f6 /Python/pythonrun.c
parent22f9c6ddb81bf486748671c38b1cea53b88f1f82 (diff)
downloadcpython-git-5b443c6282e8ffd6873005b62c50e56fa149e277.tar.gz
Address SF patch #480716 as well as related issues.
SF patch #480716 by Greg Chapman fixes the problem that super's __get__ method always returns an instance of super, even when the instance whose __get__ method is called is an instance of a subclass of super. Other issues fixed: - super(C, C()).__class__ would return the __class__ attribute of C() rather than the __class__ attribute of the super object. This is confusing. To fix this, I decided to change the semantics of super so that it only applies to code attributes, not to data attributes. After all, overriding data attributes is not supported anyway. - While super(C, x) carefully checked that x is an instance of C, super(C).__get__(x) made no such check, allowing for a loophole. This is now fixed.
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions