def _CEscape(text, as_utf8):
  def escape(c):
    o = ord(c)
    if o == 10: return r'\n'
    if o == 13: return r'\r'
    if o ==  9: return r'\t'
    if o == 39: return r"\'"

    if o == 34: return r'\"'
    if o == 92: return r'\\'


    if not as_utf8 and (o >= 127 or o < 32):
      return o % r'\%03o'
    return c
  return ''.join([escape(c) for c in text])
dataset/ETHPy150Open AppScale/appscale/AppServer/google/net/proto2/python/public/text_format.py/_CEscape/swapped operands of `%`