Ñò
$8Zc           @   sO   d  Z  d d k l Z d d k l Z l Z l Z d e i f d „  ƒ  YZ d S(   s    Fixer for operator.{isCallable,sequenceIncludes}

operator.isCallable(obj) -> hasattr(obj, '__call__')
operator.sequenceIncludes(obj) -> operator.contains(obj)
i   (   t
   fixer_base(   t   Callt   Namet   Stringt   FixOperatorc           B   s6   e  Z d  Z d Z d e d e d e ƒ Z d „  Z RS(   s(   method=('isCallable'|'sequenceIncludes')s   '(' func=any ')'s¾   
              power< module='operator'
                trailer< '.' %(methods)s > trailer< %(func)s > >
              |
              power< %(methods)s trailer< %(func)s > >
              t   methodst   funcc         C   sá   | d d } | i  d j o8 d | j o |  i | d ƒ qÝ d | _  | i ƒ  nˆ | i  d j ow d | j o |  i | d | d	 i  ƒ qÝ | d	 } | i ƒ  t d
 ƒ t d ƒ g } t t d ƒ | d | i ƒSn d  S(   Nt   methodi    u   sequenceIncludest   modules&   You should use operator.contains here.u   containsu
   isCallables,   You should use hasattr(%s, '__call__') here.R   u   , u
   '__call__'u   hasattrt   prefix(   t   valuet   warningt   changedt   cloneR   R   R   R	   (   t   selft   nodet   resultsR   R   t   args(    (    s0   /usr/lib/python2.6/lib2to3/fixes/fix_operator.pyt	   transform   s    		
!(   t   __name__t
   __module__R   R   t   dictt   PATTERNR   (    (    (    s0   /usr/lib/python2.6/lib2to3/fixes/fix_operator.pyR      s   N(	   t   __doc__t    R    t
   fixer_utilR   R   R   t   BaseFixR   (    (    (    s0   /usr/lib/python2.6/lib2to3/fixes/fix_operator.pyt   <module>   s   