Current Path : /usr/lib/python2.7/dist-packages/twisted/python/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/python/text.pyc |
Mc @ s d Z d d l Z d d l Z d d l m Z m Z d d Z d Z d Z e j e j d d d d d e d d Z d d Z e Z d Z d Z d Z e d Z d S( s' Miscellany of text-munging functions. iN( t deprecatet versionst c C s d } g } t | t j k r d } xL| j D] \ } } t | | d } t | r t | r | t d } n | j d | | | f q4 | j d | | | t | d f q4 Wn t | t j t j f k rNt | t j k rd } n d } xf | D]3 } t | | d } | j t j | d qWn( t | d t j t | d | (| s| j | n | r| | d | d t | d | d <| d | d | d <n t j | d } t | rt | r| d } n | S( s` Expansive string formatting for sequence types. list.__str__ and dict.__str__ use repr() to display their elements. This function also turns these sequence types into strings, but uses str() on their elements instead. Sequence elements are also displayed on seperate lines, and nested sequences have nested indentation. R s {}s s s %s %s: %ss %s %s: %si s ()s []t t ,c S s | | S( N( ( t st i( ( s7 /usr/lib/python2.7/dist-packages/twisted/python/text.pyt <lambda>5 s i i i( t typet typest DictTypet itemst stringyStringt isMultilinet endsInNewlinet lent appendt TupleTypet ListTypet stringt rstript mapt splitt strt join( t objectt indentationt bracest slt keyt valuet elementR ( ( s7 /usr/lib/python2.7/dist-packages/twisted/python/text.pyR s<