Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_doctest.SampleNewStyleClass Class Reference
Inheritance diagram for test.test_doctest.SampleNewStyleClass:
Inheritance graph
[legend]
Collaboration diagram for test.test_doctest.SampleNewStyleClass:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def double
def get

Public Attributes

 val
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Definition at line 106 of file test_doctest.py.


Constructor & Destructor Documentation

>>> print(SampleNewStyleClass(12).get())
12

Definition at line 113 of file test_doctest.py.

00113 
00114     def __init__(self, val):
00115         """
00116         >>> print(SampleNewStyleClass(12).get())
00117         12
00118         """
00119         self.val = val

Here is the caller graph for this function:


Member Function Documentation

>>> print(SampleNewStyleClass(12).double().get())
24

Definition at line 120 of file test_doctest.py.

00120 
00121     def double(self):
00122         """
00123         >>> print(SampleNewStyleClass(12).double().get())
00124         24
00125         """
00126         return SampleNewStyleClass(self.val + self.val)

>>> print(SampleNewStyleClass(-5).get())
-5

Definition at line 127 of file test_doctest.py.

00127 
00128     def get(self):
00129         """
00130         >>> print(SampleNewStyleClass(-5).get())
00131         -5
00132         """
00133         return self.val

Here is the caller graph for this function:


Member Data Documentation

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 118 of file test_doctest.py.


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