def to_hex(self):
    ' Hex representation of the serialized byte stream.\n\n        Returns:\n            h (str): A hex-encoded string.\n        '
    return codecs.encode(bytes(self), 'hex_codec').decode('ascii')
Hex representation of the serialized byte stream.

Returns:
    h (str): A hex-encoded string.
def to_hex(self):
    ' Hex representation of the serialized byte stream.\n\n        Returns:\n            h (str): A hex-encoded string.\n        '
    return codecs.encode(bytes(self), 'hex_codec').decode('ascii')