Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/thread-self/root/lib64/python2.7/Demo/newmetaclasses/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyo

�
��^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}xZ|j�D]L\}}|jd�s_|jd�r@qt|t�r|j|�qqWx`|D]X}|jd|�}|jd|�}|s�|rj|j||||�||<qjqjWdS(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
isinstancetfunctiontappendtgettmake_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(RRR ((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR+Js		(RRR*R0R+(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR-=s		tEiffelMetaClass2cBseZeZRS((RRR-R(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR1Rscs�dd�fd��Y}d|fd��Y}d|f�fd��Y�|�}|jd�|jd�y|jd�Wntk
r�nX��}y|jd�Wntk
r�nXy|jd	�Wntk
r�nX|jd
�dS(NtEiffelcseZ�ZRS((RRt
__metaclass__((t	metaclass(s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR2XstTestcBs,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((RR6((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pytm2ascSsdS(N((RR6((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pytm2_preescSsdS(N((RtresultR6((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pytm2_posths(RRRR7R8R:(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR5[s			tSubcs eZd�Z�fd�ZRS(cSs|dS(Ni((RR6((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR7lscst�|�j||�dS(N(RR:(RtResultR6(R;(s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR:ns(RRR7R:((R;(s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR;ks	iii
i((RR7tAssertionError(R4R2R5ttts((R;R4s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyt_testWs(	


	

t__main__N((
R#ttypesRRttypeRRR%tobjectR-R1R@R(((s2/usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyt<module>s		4


Hacked By AnonymousFox1.0, Coded By AnonymousFox