def _bytesRepr(bytestring):
 if (not isinstance(bytestring, bytes)):
  raise TypeError(('Expected bytes not %r' % (bytestring,)))
 if _PY3:
  return repr(bytestring)
 else:
  return ('b' + repr(bytestring))

def _bytesRepr ( bytestring ) : if ( not isinstance ( bytestring , bytes ) ) : raise TypeError ( ( 'Expected bytes not %r' % ( bytestring , ) ) ) if _PY3 : return repr ( bytestring ) else : return ( 'b' + repr ( bytestring ) )
provide a repr for a byte string that begins with b on both python 2 and 3 .