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
Collaboration diagram for test.test_codecs.Queue:
Collaboration graph

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


Detailed Description

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

Definition at line 7 of file

Constructor & Destructor Documentation

def test.test_codecs.Queue.__init__ (   self,

Definition at line 11 of file

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

Here is the caller graph for this function:

Member Function Documentation

def (   self,
  size = -1 

Definition at line 17 of file

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,

Definition at line 14 of file

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

Member Data Documentation

Definition at line 12 of file

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: