Package mobi :: Package mtld :: Package da :: Module property :: Class Property
[hide private]
[frames] | no frames]

Class Property

source code

object --+
         |
        Property

Contains a property value and data type id. The value can be fetched as a generic Object or one of the convenience str(), int(), bool() methods can be used to get the value in a specific type.

Instance Methods [hide private]
 
__init__(self, value, data_type)
Creates a new Property with a value and data type
source code
 
data_type(self)
Get data type name.
source code
 
__iter__(self)
Gets a set of possible values for this property.
source code
 
__bool__(self)
Get the value of the property as a boolean (Python 3.x)
source code
 
__nonzero__(self) source code
 
__int__(self)
Get the value of the property as an integer.
source code
 
__str__(self)
Gets the value of the property as string.
source code
 
__eq__(self, other)
Compare two instances of this class.
source code
 
__ne__(self, other)
Opposite to __eq__()
source code

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

Class Variables [hide private]
  __value = ''
  __data_type_id = 0
  __data_type_name = 'Boolean'
Properties [hide private]
  value
  data_type_id

Inherited from object: __class__

Method Details [hide private]

__init__(self, value, data_type)
(Constructor)

source code 

Creates a new Property with a value and data type

Parameters:
  • value - is the value to store
  • data_type - is a byte or char that represents the data type of the value to store
Overrides: object.__init__

data_type(self)

source code 

Get data type name. It returns a String with the data type name

__iter__(self)

source code 

Gets a set of possible values for this property. This is typically only used when it is known that a given property name can have multiple possible values. All items in the set will have the same data type. It returns the array value of the property

__str__(self)
(Informal representation operator)

source code 

Gets the value of the property as string. If a property has multiple possible values then the values are concatenated with a comma.

Overrides: object.__str__

__eq__(self, other)
(Equality operator)

source code 

Compare two instances of this class. If both have equal values and data type then returns true.


Property Details [hide private]

value

Get Method:
unreachable.value(self)

data_type_id

Get Method:
unreachable.data_type_id(self)