N
īłO5c       sn   d  Z  k l k Z d   Z d d  Z d   Z e i d  Z d   Z d   Z	 e
 d j o e	   n d	 S(
   s?   Support for number formatting using the current locale settingsc    sā   t    } | d } | o |  Sn d } x |  o | o{ | d t j o Pn* | d d j o | d } | d } n | o |  | | d | } n |  | } |  |  }  q, W|  o | o |  | d | } n | Sd  S(   Ns   groupings    i    i   s   thousands_sep(   s
   localeconvs   convs   groupings   ss   results   CHAR_MAXs   group(   s   ss   convs   groupings   results   groups0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   _group s&    	
  
c    s   |  | } t i | d  } | o t | d  | d <n t |  d j o | d t	   d | d Sn) t |  d j o | d Sn
 t
 d  d S(   sØ   Formats a value in the same way that the % formatting would use,
    but takes the current locale into account. 
    Grouping is applied if the third parameter is true.s   .i    i   s   decimal_pointi   s(   Too many decimal points in result stringN(   s   fs   vals   results   strings   splitfieldss   fieldss   groupings   _groups   lens
   localeconvs   Error(   s   fs   vals   groupings   results   fieldss0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   format s     
i    c    s   t  d |   Sd S(   s9   Convert float to integer, taking the locale into account.s   %.12gN(   s   formats   val(   s   vals0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   str. s     c    sd   t  i |  t   d  } t  i | d  }  t  i |  t   d  } t  i | d  }  | |   Sd S(   s<   Parses a string as a float according to the locale settings.s   thousands_seps    s   decimal_points   .N(   s   strings   splitfieldss   strs
   localeconvs   ss   joins   func(   s   strs   funcs   ss0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   atof2 s     c    s   t  |  t i  Sd S(   sA   Converts a string to an integer according to the locale settings.N(   s   atofs   strs   strings   atoi(   s   strs0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   atoi= s     c     sU   t  t d  t d d d  }  |  Gd Gt |   GHt d  }  |  Gd Gt |   GHd  S(   Ns    s   %diĶ[i   s   isf3.14(   s	   setlocales   LC_ALLs   formats   s1s   atois   strs   atof(   s   s1s0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   testA s
    s   __main__N(   s   __doc__s   _locales   *s   strings   _groups   formats   strs   atofs   atois   tests   __name__(    s0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   ? s   				
