AlkantarClanX12

Your IP : 3.133.119.247


Current Path : /usr/lib/python2.7/site-packages/google/protobuf/
Upload File :
Current File : //usr/lib/python2.7/site-packages/google/protobuf/text_encoding.pyo

�
Du�ac@s�dZddlZddlZgedd�D]Zee�^q.Zded<ded<d	ed
<ded<d
ed<ded<gedd�D]Zde^q�gedd�D]Zee�^q�gedd�D]Zde^q�Zded<ded<d	ed
<ded<d
ed<ded<d�Zej	d�Z
gedd�D]Zee�^qVgedd�D]Zde^q{Zd�ZdS(sEncoding related utilities.i����Niis\ti	s\ni
s\ri
s\'i's\"i"s\\i\i s\%03oicsat|tj�rtnd��|rDdj�fd�|D��Sdj�fd�|D��S(s-Escape a bytes string for use in an ascii protocol buffer.

  text.encode('string_escape') does not seem to satisfy our needs as it
  encodes unprintable characters using two-digit hex escapes whereas our
  C++ unescaping function allows hex escapes to be any length.  So,
  "1".encode('string_escape') ends up being "\x011", which will be
  decoded in C++ as a single-character string with char code 0x11.

  Args:
    text: A byte string to be escaped
    as_utf8: Specifies if result should be returned in UTF-8 encoding
  Returns:
    Escaped string
  cSs|S(N((tx((sA/usr/lib/python2.7/site-packages/google/protobuf/text_encoding.pyt<lambda>LtRc3s|]}t�|�VqdS(N(t_cescape_utf8_to_str(t.0tc(tOrd(sA/usr/lib/python2.7/site-packages/google/protobuf/text_encoding.pys	<genexpr>Nsc3s|]}t�|�VqdS(N(t_cescape_byte_to_str(RR(R(sA/usr/lib/python2.7/site-packages/google/protobuf/text_encoding.pys	<genexpr>Os(t
isinstancetsixtstring_typestordtjoin(ttexttas_utf8((RsA/usr/lib/python2.7/site-packages/google/protobuf/text_encoding.pytCEscape;s!s"(\\+)x([0-9a-fA-F])(?![0-9a-fA-F])cCsld�}tj||�}ttkr4|jd�Sdjd�|D��}|jd�jd�jd�S(sDUnescape a text string with C-style escape sequences to UTF-8 bytes.cSsDt|jd��d@r7|jd�d|jd�S|jd�S(Nitx0ii(tlentgroup(tm((sA/usr/lib/python2.7/site-packages/google/protobuf/text_encoding.pyt
ReplaceHexZst
string_escapeRcss|]}tt|�VqdS(N(t_cescape_highbit_to_strR(RR((sA/usr/lib/python2.7/site-packages/google/protobuf/text_encoding.pys	<genexpr>gstasciitunicode_escapetraw_unicode_escape(t_CUNESCAPE_HEXtsubtstrtbytestdecodeRtencode(R
Rtresult((sA/usr/lib/python2.7/site-packages/google/protobuf/text_encoding.pyt	CUnescapeWs		
	(
t__doc__treR	trangetitchrRRRtcompileRRR!(((sA/usr/lib/python2.7/site-packages/google/protobuf/text_encoding.pyt<module>s,(





I'





	%'