MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/3/root/proc/2/task/2/root/usr/lib/python2.4/Demo/newmetaclasses/Eiffel.pyc
mò
‚=5Dc@s°dZdklZdefd„ƒYZdefd„ƒYZdfd„ƒYZdefd	„ƒYZd
efd„ƒYZ	d„Z
ed
joe
eƒe
e	ƒndS(s6Support Eiffel-style preconditions and postconditions.(sfunctiontEiffelBaseMetaClasscBs&tZd„Zd„ZeeƒZRS(NcCs,|i|ƒtt|ƒi||||ƒS(N(tmetatconvert_methodstdicttsuperRt__new__tnametbases(RRRR((t0/usr/lib/python2.4/Demo/newmetaclasses/Eiffel.pyRs
cCség}xv|iƒD]h\}}|idƒp|idƒot|tƒpt‚qt|tƒo|i	|ƒqqWxc|D][}|id|ƒ}|id|ƒ}|p|o!|i||||ƒ||<q†q†WdS(síReplace functions in dict with EiffelMethod wrappers.

        The dict is modified in place.

        If a method ends in _pre or _post, it is removed from the dict
        regardless of whether there is a corresponding method.
        t_pret_posts%s_pres%s_postN(tmethodsRt	iteritemstktvtendswitht
isinstancetfunctiontAssertionErrortappendtmtgettpretposttclstmake_eiffel_method(RRRRR
RRR((RRs
 (t__name__t
__module__RRtclassmethod(((RRs		tEiffelMetaClass1cBstZd„ZeeƒZRS(Ncs0‡‡‡d†}ˆioˆi|_n|S(NcsOˆoˆ|||Žnˆ|||Ž}ˆoˆ||||Žn|S(N(RtselftargstkwargstfunctxR(RRR R"(RR!R(Rtmethod's(R#R!t__doc__(R!RRR#((R!RRRR&s
(RRRtstaticmethod(((RR#s	tEiffelMethodWrappercBstZd„Zd„ZRS(NcCs||_||_dS(N(tinstRt_insttdescrt_descr(RR'R)((Rt__init__8s	cOs|ii|i||ƒS(N(RR*t
callmethodR(RR (RRR ((Rt__call__<s(RRR+R-(((RR&6s	tEiffelDescriptorcBs#tZd„Zd„Zd„ZRS(NcCs7||_||_||_|i|_|i|_dS(N(	R!Rt_funcRR	RR
RR$(RR!RR((RR+As
			cCs
t||ƒS(N(R&tobjR(RR0R((Rt__get__IscCs^|io|i|||Žn|i|||Ž}|io|i||||Žn|S(N(RR	R'RR R/R"R
(RR'RR R"((RR,Ls

(RRR+R1R,(((RR.?s		tEiffelMetaClass2cBstZeZRS(N(RRR.R(((RR2Tscs!df‡d†ƒY}d|fd„ƒY}d|f‡d†ƒY‰|ƒ}|idƒ|idƒy|idƒWntj
onXtpt‚ˆƒ}y|idƒWntj
onXtpt‚y|id	ƒWntj
onXtpt‚|id
ƒdS(NtEiffelcstZˆZRS(N(RRt	metaclasst
__metaclass__((R4(RR3ZstTestcBs,tZd„Zd„Zd„Zd„ZRS(NcCs|dS(sMake it a little largeriN(targ(RR7((RR_scCs|dS(sMake it a little largeriN(R7(RR7((Rtm2cscCs|djpt‚dS(Ni(R7R(RR7((Rtm2_pregscCs||jpt‚dS(N(tresultR7R(RR:R7((Rtm2_postjs(RRRR8R9R;(((RR6]s			tSubcstZd„Z‡d†ZRS(NcCs|dS(Ni(R7(RR7((RR8nscs1tˆ|ƒi||ƒ|djpt‚dS(Nid(RR<RR;tResultR7R(RR=R7(R<(RR;ps(RRR8R;((R<(RR<ms	iii
i(	R3R6R<ttRR8RtFalsets(R4R<R3R@R>R6((R4R<Rt_testYs.	

	t__main__N(R$tnewRttypeRRR&tobjectR.R2RAR(RR&R2RARRR.((Rt?s
		4