Package tdi :: Module interfaces :: Class DecoderInterface
[frames] | no frames]

Class DecoderInterface

source code

object --+
         |
        DecoderInterface

Decoder Interface
Instance Methods
basestring
normalize(self, name)
Normalize a name
source code
unicode
decode(self, value, errors='strict')
Decode an arbitrary value
source code
unicode
attribute(self, value, errors='strict')
Decode a raw attribute value
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables
str encoding
The source encoding
Properties

Inherited from object: __class__

Method Details

normalize(self, name)

source code 
Normalize a name
Parameters:
  • name (basestring) - The name to normalize
Returns: basestring
The normalized name

decode(self, value, errors='strict')

source code 
Decode an arbitrary value
Parameters:
  • value (str) - attribute value
  • errors (str) - Error handler description
Returns: unicode
The decoded value

attribute(self, value, errors='strict')

source code 
Decode a raw attribute value
Parameters:
  • value (str) - Raw attribute value
  • errors (str) - Error handler description
Returns: unicode
The decoded attribute

Instance Variable Details

encoding

The source encoding
Type:
str