Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/idna/__pycache__/intranges.cpython-37.pyc

17 lines
1.7 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
#U<>]<5D><00>@s0dZddlZdd<04>Zdd<06>Zdd<08>Zd d
<EFBFBD>ZdS) a 
Given a list of integers, made up of (hopefully) a small number of long runs
of consecutive integers, compute a representation of the form
((start1, end1), (start2, end2) ...). Then answer the question "was x present
in the original list?" in time O(log(# runs)).
<EFBFBD>NcCs<>t|<00>}g}d}xrtt|<01><01>D]b}|dt|<01>krL||||ddkrLq||d|d<00>}|<02>t|d|dd<00><02>|}qWt|<02>S)aRepresent a list of integers as a sequence of ranges:
((start_0, end_0), (start_1, end_1), ...), such that the original
integers are exactly those x such that start_i <= x < end_i for some i.
Ranges are encoded as single integers (start << 32 | end), not as tuples.
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>r)<06>sorted<65>range<67>len<65>append<6E> _encode_range<67>tuple)<06>list_<74> sorted_list<73>ranges<65>
last_write<EFBFBD>i<> current_range<67>r<00>0/tmp/pip-install-zuyyrlx8/idna/idna/intranges.py<70>intranges_from_list
srcCs |d>|BS)N<> r)<02>start<72>endrrrrsrcCs|d?|d@fS)Nrl<00><EFBFBD>r)<01>rrrr<00> _decode_range"srcCszt|d<01>}t<01>||<02>}|dkrNt||d<00>\}}||krF|krNnndS|t|<01>krvt||<00>\}}||krvdSdS)z=Determine if `int_` falls into one of the ranges in `ranges`.rrTF)r<00>bisect<63> bisect_leftrr)<07>int_r <00>tuple_<65>pos<6F>left<66>right<68>_rrr<00>intranges_contain&s
  r )<06>__doc__rrrrr rrrr<00><module>s