Package gavo :: Package base :: Module attrdef :: Class UnicodeAttribute
[frames] | no frames]

Class UnicodeAttribute

source code

  object --+        
           |        
AttributeDef --+    
               |    
 AtomicAttribute --+
                   |
                  UnicodeAttribute
Known Subclasses:

An attribute definition for an item containing a unicode string.

In addition to AtomicAttribute's keywords, you can use ``strip`` (default false) to have leading and trailing whitespace be removed on parse. (Unparsing will not add it back).

You can also add ``expand`` (default False) to have UnicodeAttribute try and expand RD macros on the instance passed in. This of course only works if the attribute lives on a class that is a MacroPackage.

Instance Methods
 
__init__(self, name, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
feed(self, ctx, instance, value) source code
 
parse(self, value)
returns a typed python value for the string representation value.
source code
 
unparse(self, value)
returns a typed python value for the string representation value.
source code

Inherited from AtomicAttribute: feedObject, getCopy, makeUserDoc

Inherited from AttributeDef: doCallbacks, iterParentMethods

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

Class Variables
  typeDesc_ = 'unicode string'
Properties

Inherited from object: __class__

Method Details

__init__(self, name, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

feed(self, ctx, instance, value)

source code 
Overrides: AttributeDef.feed

parse(self, value)

source code 

returns a typed python value for the string representation value.

value can be expected to be a unicode string.

Overrides: AtomicAttribute.parse
(inherited documentation)

unparse(self, value)

source code 

returns a typed python value for the string representation value.

value can be expected to be a unicode string.

Overrides: AtomicAttribute.unparse
(inherited documentation)