summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-02-12 03:32:58 (GMT)
committerGuido van Rossum <guido@python.org>2003-02-12 03:32:58 (GMT)
commit03bc7d3c4d22146b2e28c39e6c2e239137318f0a (patch)
tree3a926bb496d70ae4bd0445b5db5889b226ceaad7 /Misc
parent73019a6321ba3718e31c110c290b94949be1b70f (diff)
downloadcpython-03bc7d3c4d22146b2e28c39e6c2e239137318f0a.zip
cpython-03bc7d3c4d22146b2e28c39e6c2e239137318f0a.tar.gz
cpython-03bc7d3c4d22146b2e28c39e6c2e239137318f0a.tar.bz2
SF #532767: isinstance(x, X) should work when x is a proxy for an X
instance, as long as x.__class__ is X or a subclass thereof. Did a little cleanup of PyObject_IsInstance() too.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index ed4f7cf..d88f753 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,11 @@ What's New in Python 2.3 alpha 2?
Core and builtins
-----------------
+- 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
+ case.)
+
- compile(), eval() and the exec statement now fully support source code
passed as unicode strings.