Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
encodings.utf_8_sig.IncrementalEncoder Class Reference
Inheritance diagram for encodings.utf_8_sig.IncrementalEncoder:
Inheritance graph
[legend]
Collaboration diagram for encodings.utf_8_sig.IncrementalEncoder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def encode
def reset
def getstate
def setstate

Public Attributes

 first
 errors
 buffer
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Definition at line 26 of file utf_8_sig.py.


Constructor & Destructor Documentation

def encodings.utf_8_sig.IncrementalEncoder.__init__ (   self,
  errors = 'strict' 
)
Creates an IncrementalEncoder instance.

The IncrementalEncoder may use different error handling schemes by
providing the errors keyword argument. See the module docstring
for a list of possible values.

Reimplemented from codecs.IncrementalEncoder.

Definition at line 27 of file utf_8_sig.py.

00027 
00028     def __init__(self, errors='strict'):
00029         codecs.IncrementalEncoder.__init__(self, errors)
00030         self.first = 1

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

def encodings.utf_8_sig.IncrementalEncoder.encode (   self,
  input,
  final = False 
)
Encodes input and returns the resulting object.

Reimplemented from codecs.IncrementalEncoder.

Definition at line 31 of file utf_8_sig.py.

00031 
00032     def encode(self, input, final=False):
00033         if self.first:
00034             self.first = 0
00035             return codecs.BOM_UTF8 + \
00036                    codecs.utf_8_encode(input, self.errors)[0]
00037         else:
00038             return codecs.utf_8_encode(input, self.errors)[0]

Here is the caller graph for this function:

Return the current state of the encoder.

Reimplemented from codecs.IncrementalEncoder.

Definition at line 43 of file utf_8_sig.py.

00043 
00044     def getstate(self):
00045         return self.first

Resets the encoder to the initial state.

Reimplemented from codecs.IncrementalEncoder.

Definition at line 39 of file utf_8_sig.py.

00039 
00040     def reset(self):
00041         codecs.IncrementalEncoder.reset(self)
00042         self.first = 1

Here is the call graph for this function:

Here is the caller graph for this function:

Set the current state of the encoder. state must have been
returned by getstate().

Reimplemented from codecs.IncrementalEncoder.

Definition at line 46 of file utf_8_sig.py.

00046 
00047     def setstate(self, state):
00048         self.first = state


Member Data Documentation

Reimplemented in codecs.BufferedIncrementalEncoder.

Definition at line 173 of file codecs.py.

Creates an IncrementalEncoder instance.

The IncrementalEncoder may use different error handling schemes by
providing the errors keyword argument. See the module docstring
for a list of possible values.

Reimplemented in encodings.bz2_codec.IncrementalEncoder, encodings.zlib_codec.IncrementalEncoder, encodings.base64_codec.IncrementalEncoder, and encodings.hex_codec.IncrementalEncoder.

Definition at line 172 of file codecs.py.

Definition at line 29 of file utf_8_sig.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: