Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
sqlite3.test.types.DeclTypesTests.Foo Class Reference

List of all members.

Public Member Functions

def __init__
def __cmp__
def __eq__
def __conform__
def __str__

Public Attributes

 val

Detailed Description

Definition at line 83 of file types.py.


Constructor & Destructor Documentation

Definition at line 84 of file types.py.

00084 
00085         def __init__(self, _val):
00086             if isinstance(_val, bytes):
00087                 # sqlite3 always calls __init__ with a bytes created from a
00088                 # UTF-8 string when __conform__ was used to store the object.
00089                 _val = _val.decode('utf8')
00090             self.val = _val

Here is the caller graph for this function:


Member Function Documentation

def sqlite3.test.types.DeclTypesTests.Foo.__cmp__ (   self,
  other 
)

Definition at line 91 of file types.py.

00091 
00092         def __cmp__(self, other):
00093             if not isinstance(other, DeclTypesTests.Foo):
00094                 raise ValueError
00095             if self.val == other.val:
00096                 return 0
00097             else:
00098                 return 1

Here is the caller graph for this function:

def sqlite3.test.types.DeclTypesTests.Foo.__conform__ (   self,
  protocol 
)

Definition at line 105 of file types.py.

00105 
00106         def __conform__(self, protocol):
00107             if protocol is sqlite.PrepareProtocol:
00108                 return self.val
00109             else:
00110                 return None

def sqlite3.test.types.DeclTypesTests.Foo.__eq__ (   self,
  other 
)

Definition at line 99 of file types.py.

00099 
00100         def __eq__(self, other):
00101             c = self.__cmp__(other)
00102             if c is NotImplemented:
00103                 return c
00104             return c == 0

Here is the call graph for this function:

Definition at line 111 of file types.py.

00111 
00112         def __str__(self):
00113             return "<%s>" % self.val
00114 
    def setUp(self):

Member Data Documentation

Definition at line 89 of file types.py.


The documentation for this class was generated from the following file: