bson::code::Code Class Reference

List of all members.

Public Member Functions

def __eq__
def __ne__
def __new__
def __repr__
def scope

Private Attributes


Detailed Description

BSON's JavaScript code type.

Raises :class:`TypeError` if `code` is not an instance of
:class:`basestring` or `scope` is not ``None`` or an instance of

Scope variables can be set by passing a dictionary as the `scope`
argument or by using keyword arguments. If a variable is set as a
keyword argument it will override any setting for that variable in
the `scope` dictionary.

  - `code`: string containing JavaScript code to be evaluated
  - `scope` (optional): dictionary representing the scope in which
    `code` should be evaluated - a mapping from identifiers (as
    strings) to values
  - `**kwargs` (optional): scope variables can also be passed as
    keyword arguments

.. versionadded:: 1.9
   Ability to pass scope values using keyword arguments.

Definition at line 19 of file bson/

Member Function Documentation

def bson::code::Code::__eq__ (   self,

Definition at line 72 of file bson/

def bson::code::Code::__ne__ (   self,

Definition at line 77 of file bson/

def bson::code::Code::__new__ (   cls,
  scope = None,

Definition at line 43 of file bson/

def bson::code::Code::__repr__ (   self  ) 

Definition at line 69 of file bson/

def bson::code::Code::scope (   self  ) 
Scope dictionary for this instance.

Definition at line 64 of file bson/

Member Data Documentation

Definition at line 50 of file bson/

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

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