Re: Determining if an object is a class?

2006-07-12 Thread Clay Culver
Ahh much better. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining if an object is a class?

2006-07-13 Thread Clay Culver
Dino Viehland wrote: > The first check is also off - it should if issubclass(type(Test), type): > otherwise you miss the metaclass case: > > class foo(type): pass > > class Test(object): > __metaclass__ = foo > > obj = Test > if type(obj) == type: 'class obj' > else: 'not a class' > > just on