def is_bytes(obj):
    "Helper method to see if the object is a bytestring.\n\n    >>> is_bytes(b'foo')\n    True\n    "
    return (type(obj) is bytes)
Helper method to see if the object is a bytestring.

>>> is_bytes(b'foo')
True
def is_bytes(obj):
    "Helper method to see if the object is a bytestring.\n\n    >>> is_bytes(b'foo')\n    True\n    "
    return (type(obj) is bytes)