ok
Direktori : /usr/lib64/python2.7/Demo/newmetaclasses/ |
Current File : //usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyo |
� ��^c @ s� d Z d d l m Z d e f d � � YZ d e f d � � YZ d d d � � YZ d e f d � � YZ d e f d � � YZ d � Z e d k r� e e � e e � n d S( s6 Support Eiffel-style preconditions and postconditions.i����( t FunctionTypet EiffelBaseMetaClassc B s e Z d � Z e d � � Z RS( c C s, | j | � t t | � j | | | | � S( N( t convert_methodst superR t __new__( t metat namet basest dict( ( s2 /usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR s c C s� g } xZ | j � D]L \ } } | j d � s_ | j d � r@ q t | t � r | j | � q q Wx` | D]X } | j d | � } | j d | � } | s� | rj | j | | | | � | | <qj qj Wd S( 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 iteritemst endswitht isinstancet functiont appendt gett make_eiffel_method( t clsR t methodst kt vt mt pret post( ( s2 /usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR s ( t __name__t __module__R t classmethodR ( ( ( s2 /usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyR s t EiffelMetaClass1c B s e Z e d � � Z RS( c s1 � � � f d � } � j r- � j | _ n | S( Nc sK � r � | | | � n � | | | � } � rG � | | | | � n | S( N( ( t selft argst kwargst x( t funcR R ( s2 /usr/lib64/python2.7/Demo/newmetaclasses/Eiffel.pyt method'