-í
æ¶<c       sj     d  Z    d e d „ Z  e Z  d e d „ Z ) e Z + d e d „ Z = d e d „ Z d S(   s   Bisection algorithms.i    c    sš    
  | t j o  t |  ƒ } n  xT  | | j  oC  | | d }  | |  | j  o  | } n  | d } q/ W |  i | | ƒ d S(   sï   Insert item x in list a, and keep it sorted assuming a is sorted.

    If x is already in a, insert it to the right of the rightmost x.

    Optional args lo (default 0) and hi (default len(a)) bound the
    slice of a to be searched.
    i   i   N(   s   his   Nones   lens   as   los   mids   xs   insert(   s   as   xs   los   his   mid(    (    s   /usr/lib/python2.2/bisect.pys   insort_right s     c    sŽ     ! | t j o " t |  ƒ } n # xT # | | j  oC $ | | d } % | |  | j  o % | } n & | d } q/ W' | Sd S(   sr  Return the index where to insert item x in list a, assuming a is sorted.

    The return value i is such that all e in a[:i] have e <= x, and all e in
    a[i:] have e > x.  So if x already appears in the list, i points just
    beyond the rightmost x already there.

    Optional args lo (default 0) and hi (default len(a)) bound the
    slice of a to be searched.
    i   i   N(   s   his   Nones   lens   as   los   mids   x(   s   as   xs   los   his   mid(    (    s   /usr/lib/python2.2/bisect.pys   bisect_right s   	  c    sš   + 2 4 | t j o 5 t |  ƒ } n 6 xT 6 | | j  oC 7 | | d } 8 |  | | j  o 8 | d } n
 9 | } q/ W: |  i | | ƒ d S(   sí   Insert item x in list a, and keep it sorted assuming a is sorted.

    If x is already in a, insert it to the left of the leftmost x.

    Optional args lo (default 0) and hi (default len(a)) bound the
    slice of a to be searched.
    i   i   N(   s   his   Nones   lens   as   los   mids   xs   insert(   s   as   xs   los   his   mid(    (    s   /usr/lib/python2.2/bisect.pys   insort_left+ s     c    sŽ   = F H | t j o I t |  ƒ } n J xT J | | j  oC K | | d } L |  | | j  o L | d } n
 M | } q/ WN | Sd S(   sq  Return the index where to insert item x in list a, assuming a is sorted.

    The return value i is such that all e in a[:i] have e < x, and all e in
    a[i:] have e >= x.  So if x already appears in the list, i points just
    before the leftmost x already there.

    Optional args lo (default 0) and hi (default len(a)) bound the
    slice of a to be searched.
    i   i   N(   s   his   Nones   lens   as   los   mids   x(   s   as   xs   los   his   mid(    (    s   /usr/lib/python2.2/bisect.pys   bisect_left= s   	  N(   s   __doc__s   Nones   insort_rights   insorts   bisect_rights   bisects   insort_lefts   bisect_left(   s   insort_lefts   insort_rights   bisect_rights   bisects   bisect_lefts   insort(    (    s   /usr/lib/python2.2/bisect.pys   ? s   		