Package dbus :: Class Array
[hide private]
[frames] | no frames]

Class Array

source code

object --+    
         |    
      list --+
             |
            Array

An array of similar items, implemented as a subtype of list.

As currently implemented, an Array behaves just like a list, but with the addition of a signature property set by the constructor; conversion of its items to D-Bus types is only done when it's sent in a Message. This might change in future so validation is done earlier.

Constructor:

dbus.Array([iterable][, signature][, variant_level])

variant_level must be non-negative; the default is 0.

signature is the D-Bus signature string for a single element of the array, or None. If not None it must represent a single complete type, the type of a single array item; the signature of the whole Array may be obtained by prepending a to the given signature.

If None (the default), when the Array is sent over D-Bus, the item signature will be guessed from the first element.

Instance Methods [hide private]
new list
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
a new object with type S, a subtype of T
__new__(T, S, ...) source code
 
__repr__(x)
repr(x)
source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from list: __hash__

Instance Variables [hide private]
int variant_level
Indicates how many nested Variant containers this object is contained in: if a message's wire format has a variant containing a variant containing an array, this is represented in Python by an Array with variant_level==2.
Properties [hide private]
  signature
The D-Bus signature of each element of this Array (a Signature instance)

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Returns: new list
Overrides: object.__init__

__new__(T, S, ...)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__repr__(x)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__

Instance Variable Details [hide private]

variant_level

Indicates how many nested Variant containers this object is contained in: if a message's wire format has a variant containing a variant containing an array, this is represented in Python by an Array with variant_level==2.