bson::binary::Binary Class Reference

List of all members.

Public Member Functions

def __eq__
def __ne__
def __new__
def __repr__
def subtype

Private Attributes

 __subtype

Detailed Description

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.


Member Function Documentation

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.


Member Data Documentation

Definition at line 91 of file bson/binary.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


pymongo
Author(s): Bhaskara Marthi
autogenerated on Fri Jan 11 10:09:05 2013