def Binary ( x ) : if isinstance ( x , text_type ) and not ( JYTHON or IRONPYTHON ) : return x . encode ( ) return bytes ( x )
integrer to bytes python
Return x as a binary type .
def Binary(x):
    """Return x as a binary type."""
    if isinstance(x, text_type) and not (JYTHON or IRONPYTHON):
        return x.encode()
    return bytes(x)