diff options
author | Guido van Rossum <guido@python.org> | 2003-02-12 03:58:38 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-02-12 03:58:38 (GMT) |
commit | a89d10edc94b3c1c62a6920d4b6b8219675f36da (patch) | |
tree | 4b614ef1cd6bc73f36397b8e3320f0f70f412ee7 /Misc | |
parent | e5b130bcdb491b7d4af7cd4c9cf82ebf6ba5fc63 (diff) | |
download | cpython-a89d10edc94b3c1c62a6920d4b6b8219675f36da.zip cpython-a89d10edc94b3c1c62a6920d4b6b8219675f36da.tar.gz cpython-a89d10edc94b3c1c62a6920d4b6b8219675f36da.tar.bz2 |
Implement another useful feature for proxies: in super(X, x), x may
now be a proxy for an X instance, as long as issubclass(x.__class__, X).
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -12,6 +12,9 @@ What's New in Python 2.3 alpha 2? Core and builtins ----------------- +- super(X, x): x may now be a proxy for an X instance, i.e. + issubclass(x.__class__, X) but not issubclass(type(x), X). + - isinstance(x, X): if X is a new-style class, this is now equivalent to issubclass(type(x), X) or issubclass(x.__class__, X). Previously only type(x) was tested. (For classic classes this was already the |