[Python-checkins] python/dist/src/Misc NEWS,1.555,1.556

doerwalter@users.sourceforge.net doerwalter@users.sourceforge.net
Thu, 12 Dec 2002 08:42:13 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv439/Misc

Modified Files:
	NEWS 
Log Message:
Enhance issubclass() and PyObject_IsSubclass() so that a tuple is
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.

This closes SF patch #649608.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.555
retrieving revision 1.556
diff -C2 -d -r1.555 -r1.556
*** NEWS	9 Dec 2002 08:56:06 -0000	1.555
--- NEWS	12 Dec 2002 16:41:39 -0000	1.556
***************
*** 85,88 ****
--- 85,92 ----
  -----------------
  
+ - issubclass now supports a tuple as the second argument, just like
+   isinstance does. ``issubclass(X, (A, B))`` is equivalent to
+   ``issubclass(X, A) or issubclass(X, B)``.
+ 
  - Thanks to Armin Rigo, the last known way to provoke a system crash
    by cleverly arranging for a comparison function to mutate a list