mς ‘γΈEc@sŠdZdklZdklZlZgZed„ƒZd„Zd„Z dk l Z dk l Z d„Zd „Ze eƒ[ d S( sŽUse structured monkey-patching to enable ``ISized`` adapters for Zope 2 objects. $Id: sizeconfigure.py 67820 2006-05-02 09:21:45Z philikon $ (sISized(s fivemethods isFiveMethodcCsxt|dƒ}|dj o+|iƒ\}}|djo|SqGnt|ddƒ}|dj o|i ƒSndS(Ntbytet__five_original_get_size( tISizedtselftNonetsizetsizeForSortingtunittamounttgetattrtmethodR(RRR RR((t:/data/zmath/zope/lib/python/Products/Five/sizeconfigure.pytget_sizes    cCsKt|dƒo!t|iƒ o|i|_nt|_ti|ƒdS(s+Monkey the class to be sizable through FiveR N(thasattrtclass_t isFiveMethodR Rt_monkiedtappend(R((R t classSizable$s ! cCs)|idd|fdtd|fƒdS(Nt discriminators five:sizabletcallabletargs(t_contexttactionRR(RR((R tsizable-s(s killMonkey(s addCleanUpcCst|ddƒdS(s;Restore class's initial state with respect to being sizableR RN(t killMonkeyR(R((R t unsizable8scCsxtD]}t|ƒqWdS(N(RRR(R((R tcleanUp<sN(t__doc__tzope.size.interfacesRt Products.Fivet fivemethodRRR RRtProducts.Five.fiveconfigureRtzope.testing.cleanupt addCleanUpRR( RRRRR"R RRRRR((R t?s