ó
è¾bc           @   sI   d  Z  d d l m Z d d l m Z m Z d e j f d „  ƒ  YZ d S(   s*   Fixer for __nonzero__ -> __bool__ methods.i   (   t
   fixer_base(   t   Namet   symst
   FixNonzeroc           B   s   e  Z e Z d  Z d „  Z RS(   sÓ   
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def' name='__nonzero__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    c         C   s0   | d } t  d d | j ƒ} | j | ƒ d  S(   Nt   nameu   __bool__t   prefix(   R   R   t   replace(   t   selft   nodet   resultsR   t   new(    (    s/   /usr/lib/python2.7/lib2to3/fixes/fix_nonzero.pyt	   transform   s    
(   t   __name__t
   __module__t   Truet   BM_compatiblet   PATTERNR   (    (    (    s/   /usr/lib/python2.7/lib2to3/fixes/fix_nonzero.pyR      s   N(   t   __doc__t    R    t
   fixer_utilR   R   t   BaseFixR   (    (    (    s/   /usr/lib/python2.7/lib2to3/fixes/fix_nonzero.pyt   <module>   s   