Re: Determining the metaclass

2009-09-01 Thread casebash
Thanks, I am silly > > > I cannot determine if a class is an instance of a particular > > metaclass. Here is my best attempt > > > >>> class tmp(type): > > > ...     pass > > ...>>> def c(metaclass=tmp): > > > ...     pass > > ...>>> isinstance(c, tmp) > > False > > >>> isinstance(c.__class__, tm

Re: Determining the metaclass

2009-08-29 Thread Carl Banks
On Aug 29, 5:12 pm, casebash wrote: > Hi all, > > I cannot determine if a class is an instance of a particular > metaclass. Here is my best attempt > > >>> class tmp(type): > > ...     pass > ...>>> def c(metaclass=tmp): > > ...     pass > ...>>> isinstance(c, tmp) > False > >>> isinstance(c.__cla

Determining the metaclass

2009-08-29 Thread casebash
Hi all, I cannot determine if a class is an instance of a particular metaclass. Here is my best attempt >>> class tmp(type): ... pass ... >>> def c(metaclass=tmp): ... pass ... >>> isinstance(c, tmp) False >>> isinstance(c.__class__, tmp) False Can anyone explain why this fails? Thanks