Package svnmailer :: Module struct_accessors :: Class TokenlistDescriptor

[hide private]

# Class TokenlistDescriptor

source code

                      object --+
                               |
    typedstruct.MemberDescriptor --+
                                   |
                      BaseDescriptor --+
                                       |
                   BasePostmapDescriptor --+
                                           |
                                          TokenlistDescriptor

(Unicode) Tokenlist storage

Instance Methods | [hide private]

__init__(self, name, private, param=None) Initialization | source code

any

doTransform(self, value, arg) Turns into a token list | source code

any

doSubstitute(self, value, subst, arg) Substitutes the items | source code

doPostmap(self, value, mapper, arg) Maps the items | source code

Inherited from `BasePostmapDescriptor`: `doPremap`

Inherited from `BaseDescriptor`: `getCharset`, `getFileCharset`, `postmap`, `premap`, `substitute`, `transform`

Inherited from `typedstruct.MemberDescriptor`: `__delete__`, `__get__`, `__set__`

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

Instance Variables | [hide private]

Inherited from `typedstruct.MemberDescriptor`: `name`, `param`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, name, private, param=None)
(Constructor)

source code

Initialization

Overrides: object.__init__

### doTransform(self, value, arg)

source code

Turns into a token list

Parameters:
  - `value` - The value to tranform
  - `arg` - The argument used for struct initialization
Returns: any
  The transformed value
Raises:
  - `UnicodeError` - The supplied value was a string and could not be converted to unicode
  - `TypeError` - The input value is neither string nor unicode nor a tuple
  - `ValueError` - At least one of the tokens is not allowed
Overrides: BaseDescriptor.doTransform

### doSubstitute(self, value, subst, arg)

source code

Substitutes the items

Parameters:
  - `value` - The value to substitute
  - `subst` - The substitution dictionary
  - `arg` - The argument used for struct initialization
Returns: any
  The substituted value
Overrides: BaseDescriptor.doSubstitute

### doPostmap(self, value, mapper, arg)

source code

Maps the items

Parameters:
  - `value` - The value to premap
  - `mapper` - The mapper function
  - `arg` - The argument used for struct initialization
Overrides: BaseDescriptor.doPostmap