Public Member Functions | |
def | __eq__ |
def | __ne__ |
def | __new__ |
def | __repr__ |
def | subtype |
Private Attributes | |
__subtype |
Representation of BSON binary data. This is necessary because we want to represent Python strings as the BSON string type. We need to wrap binary data so we can tell the difference between what should be considered binary data and what should be considered a string when we encode to BSON. Raises TypeError if `data` is not an instance of str or `subtype` is not an instance of int. Raises ValueError if `subtype` is not in [0, 256). :Parameters: - `data`: the binary data to represent - `subtype` (optional): the `binary subtype <http://bsonspec.org/#/specification>`_ to use
Definition at line 64 of file bson/binary.py.
def bson::binary::Binary::__eq__ | ( | self, | ||
other | ||||
) |
Definition at line 100 of file bson/binary.py.
def bson::binary::Binary::__ne__ | ( | self, | ||
other | ||||
) |
Definition at line 108 of file bson/binary.py.
def bson::binary::Binary::__new__ | ( | cls, | ||
data, | ||||
subtype = OLD_BINARY_SUBTYPE | ||||
) |
Definition at line 83 of file bson/binary.py.
def bson::binary::Binary::__repr__ | ( | self | ) |
Definition at line 111 of file bson/binary.py.
def bson::binary::Binary::subtype | ( | self | ) |
Subtype of this binary data.
Definition at line 95 of file bson/binary.py.
bson::binary::Binary::__subtype [private] |
Definition at line 91 of file bson/binary.py.