Q <abon...@gmail.com> added the comment: I do not mean to reopen the bug (there are supposedly much more important things to work on in Python).
But just for the record, let me state that I feel like there is some misleading inconsistency here: - by definition, a new style class is "Any class which inherits from object" ( see http://docs.python.org/glossary.html#term-new-style-class ) ; - to support this statement, new classes are indeed explicitly defined in the form "NewClass(object)" ; - now isinstance(), that is supposed to "return whether an object is an instance of a class or of a subclass thereof" (see help(isinstance)), returns True for old-style objects. It also seems reasonable if the descendants of a class will inherit its powers, which -- in the case of the old-style classes -- they obviously don't. Furthermore, I personally see no /point/ in returning True for isinstance(Old(), object): as it is quite misleading, one could easily have made it returning e.g. None as well. As I completely accept the fact it's a feature -- ( may be slightly confusing, and probably also useless -- but ... hey, nobody's perfect ) -- should I take then calling issubclass(obj.__class__, object) to be the official way to distinguish between the new-style and the old-style classes? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14671> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com