Package tdi :: Package markup :: Module _analyzer :: Class AttributeAnalyzer
[frames] | no frames]

Class AttributeAnalyzer

source code

object --+
         |
        AttributeAnalyzer

Attribute analyzer
Instance Methods
 
__init__(self, decoder, attribute=None, overlay=None, scope=None, removeattribute=None, hidden=None)
Initialization
source code
tuple
__call__(self, attr, name='')
Analyze attributes
source code

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

Class Variables
  __implements__ = [<class 'tdi.interfaces.AttributeAnalyzerInte...
Instance Variables
str attribute
The attribute name
str scope
The scope attribute name
Properties

Inherited from object: __class__

Method Details

__init__(self, decoder, attribute=None, overlay=None, scope=None, removeattribute=None, hidden=None)
(Constructor)

source code 
Initialization
Parameters:
  • attribute (str) - The special tdi attribute name
  • overlay (str) - The overlay attribute name
  • scope (str) - The scope attribute name
  • removeattribute (bool) - Should attribute be removed from the starttag?
  • hidden (bool) - The default +- flag value. True: Tags are hidden, False: Tags are kept. If omitted or None, it's false.
Overrides: object.__init__

__call__(self, attr, name='')
(Call operator)

source code 
Analyze attributes
Parameters:
  • attr (sequence) - (key, value) list of attributes. value may be None
  • name (str) - Name of the tag. If set and containing a value, it's additionally considered being equal to a TDI attribute.
Returns: tuple
Either None if there's nothing special or a tuple of: tdi name, tdi flags, (possibly) reduced attributes, overlay info, scope info

Class Variable Details

__implements__

Value:
[<class 'tdi.interfaces.AttributeAnalyzerInterface'>]

Instance Variable Details

attribute

The attribute name
Type:
str

scope

The scope attribute name
Type:
str