ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/newmetaclasses/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyc

�
��^c@s�dZddlmZdefd��YZdefd��YZddd��YZd	efd
��YZ	defd��YZ
d
�Zedkr�ee�ee
�ndS(s6Support Eiffel-style preconditions and postconditions.i����(tFunctionTypetEiffelBaseMetaClasscBs eZd�Zed��ZRS(cCs,|j|�tt|�j||||�S(N(tconvert_methodstsuperRt__new__(tmetatnametbasestdict((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyRs
cCs�g}xo|j�D]a\}}|jd�s=|jd�rUt|t�stt�qt|t�r|j|�qqWx`|D]X}|jd|�}|jd|�}|s�|r|j||||�||<qqWdS(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(t	iteritemstendswitht
isinstancetfunctiontAssertionErrortappendtgettmake_eiffel_method(tclsRtmethodstktvtmtpretpost((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyRs

(t__name__t
__module__RtclassmethodR(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyRs	tEiffelMetaClass1cBseZed��ZRS(cs1���fd�}�jr-�j|_n|S(NcsK�r�|||�n�|||�}�rG�||||�n|S(N((tselftargstkwargstx(tfuncRR(s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pytmethod's(t__doc__(R"RRR#((R"RRs2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR%s	(RRtstaticmethodR(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR"stEiffelMethodWrappercBseZd�Zd�ZRS(cCs||_||_dS(N(t_instt_descr(Rtinsttdescr((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyt__init__6s	cOs|jj|j||�S(N(R(t
callmethodR'(RRR ((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyt__call__:s(RRR+R-(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR&4s	tEiffelDescriptorcBs#eZd�Zd�Zd�ZRS(cCs7||_||_||_|j|_|j|_dS(N(t_funcR	R
RR$(RR"RR((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR+?s
			cCs
t||�S(N(R&(RtobjR((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyt__get__GscCsZ|jr|j|||�n|j|||�}|jrV|j||||�n|S(N(R	R/R
(RR)RR R!((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR,Js		(RRR+R1R,(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR.=s		tEiffelMetaClass2cBseZeZRS((RRR.R(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR2Rscsdd�fd��Y}d|fd��Y}d|f�fd��Y�|�}|jd�|jd�y|jd�Wntk
r�n
Xts�t���}y|jd�Wntk
r�n
Xts�t�y|jd	�Wntk
r�n
Xts
t�|jd
�dS(NtEiffelcseZ�ZRS((RRt
__metaclass__((t	metaclass(s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR3XstTestcBs,eZd�Zd�Zd�Zd�ZRS(cSs|dS(sMake it a little largeri((Rtarg((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR]scSs|dS(sMake it a little largeri((RR7((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pytm2ascSs|dkst�dS(Ni(R(RR7((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pytm2_preescSs||kst�dS(N(R(RtresultR7((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pytm2_posths(RRRR8R9R;(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR6[s			tSubcs eZd�Z�fd�ZRS(cSs|dS(Ni((RR7((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR8lscs/t�|�j||�|dks+t�dS(Nid(RR;R(RtResultR7(R<(s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR;ns(RRR8R;((R<(s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR<ks	iii
i((RR8RtFalse(R5R3R6ttts((R<R5s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyt_testWs.	


	

t__main__N((
R$ttypesRRttypeRRR&tobjectR.R2RAR(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyt<module>s		4


Zerion Mini Shell 1.0