V Qc@sddlZdd dYZdd dYZdddYZeddiZd efd YZeZejd ejGHdS(iNtTracingcBseZdZdZRS(cCs||_||_||_dS(sCreate a new class.N(t__name__t __bases__t __namespace__(tselftnametbasest namespace((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyt__init__s  cCs t|S(sCreate a new instance.(tInstance(R((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyt__call__ s(Rt __module__RR (((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyRs R cBseZdZdZRS(cCs ||_dS(N(t __klass__(Rtklass((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyRscCsWy|jj|}Wntk r0t|nXt|tjk rJ|St||S(N(R RtKeyErrortAttributeErrorttypettypest FunctionTypet BoundMethod(RRtvalue((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyt __getattr__s  (RR RR(((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyR s RcBseZdZdZRS(cCs||_||_dS(N(tfunctiontinstance(RRR((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyRs cGs9dG|jGdG|jGdG|GHt|j|jf|S(Ntcallingtfortwith(RRtapply(Rtargs((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyR s(RR RR (((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyRs tTracet MyTracedClasscBseZdZdZRS(cCs ||_dS(N(ta(RR((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pytmethod1$scCs|jS(N(R(R((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pytmethod2&s(RR R R!(((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyR#s i ((((( RRR RRRt aninstanceR R!(((s//usr/lib64/python2.7/Demo/metaclasses/Simple.pyts