[Python-Dev] Changing semantics of issubclass when accepting a tuple (original) (raw)

Guido van Rossum guido at python.org
Sun Dec 14 17:32:50 EST 2003


Bug #858016 shows how issubclass can segfault if you pass a deeply nested tuple as issubclass' second argument. I would like to propose changing the semantics so that it only accepts a flat tuple; when a tuple is passed in to do a quick check that each item is a class and if it is pass that to issubclass.

Works for me.

But this is a change in semantics. Tim said I should clear it here first so that is what I am doing. Anyone have issues if I do this? And if so, any objections of backporting to 2.3?

Let's not mess with 2.3 semantics.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list