diff options
author | Guido van Rossum <guido@python.org> | 2001-12-03 15:38:28 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-12-03 15:38:28 (GMT) |
commit | 5b443c6282e8ffd6873005b62c50e56fa149e277 (patch) | |
tree | ad424630007b688380534e7d2181a59aba44c8f6 /Lib/webbrowser.py | |
parent | 22f9c6ddb81bf486748671c38b1cea53b88f1f82 (diff) | |
download | cpython-5b443c6282e8ffd6873005b62c50e56fa149e277.zip cpython-5b443c6282e8ffd6873005b62c50e56fa149e277.tar.gz cpython-5b443c6282e8ffd6873005b62c50e56fa149e277.tar.bz2 |
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 'Lib/webbrowser.py')
0 files changed, 0 insertions, 0 deletions