Back to index

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

List of all members.

Public Member Functions

def __init__
def write
def read

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Private Attributes

 _buffer

Detailed Description

queue: write bytes at one end, read bytes from the other end

Definition at line 7 of file test_codecs.py.


Constructor & Destructor Documentation

def test.test_codecs.Queue.__init__ (   self,
  buffer 
)

Definition at line 11 of file test_codecs.py.

00011 
00012     def __init__(self, buffer):
00013         self._buffer = buffer

Here is the caller graph for this function:


Member Function Documentation

def test.test_codecs.Queue.read (   self,
  size = -1 
)

Definition at line 17 of file test_codecs.py.

00017 
00018     def read(self, size=-1):
00019         if size<0:
00020             s = self._buffer
00021             self._buffer = self._buffer[:0] # make empty
00022             return s
00023         else:
00024             s = self._buffer[:size]
00025             self._buffer = self._buffer[size:]
00026             return s

Here is the caller graph for this function:

def test.test_codecs.Queue.write (   self,
  chars 
)

Definition at line 14 of file test_codecs.py.

00014 
00015     def write(self, chars):
00016         self._buffer += chars


Member Data Documentation

Definition at line 12 of file test_codecs.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


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