[Python-Dev] Should issubclass() be more like isinstance()? (original) (raw)
Crutcher Dunnavant crutcher at gmail.com
Wed Apr 5 02:27:03 CEST 2006
- Previous message: [Python-Dev] current 2.5 status
- Next message: [Python-Dev] Should issubclass() be more like isinstance()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
While nocking together a framework today, I ran into the amazing limitations of issubclass().
A) issubclass() throws a TypeError if the object being checked is not a class, which seems very strange. It is a predicate, and lacking a isclass() method, it should just return False. B) issubclass() won't work on a list of classs, the way isinstance() does.
Is there any support for patches which fix A and/or B?
-- Crutcher Dunnavant <crutcher at gmail.com> littlelanguages.com monket.samedi-studios.com
- Previous message: [Python-Dev] current 2.5 status
- Next message: [Python-Dev] Should issubclass() be more like isinstance()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]