Arrays and MultiValues¶
Array
¶
-
class
Array
(value=Unspecified, **kw)¶ Bases:
flatland.schema.containers.Sequence
A transparent homogeneous Container, for multivalued form elements.
Arrays hold a collection of values under a single name, allowing all values of a repeated
(key, value)
pair to be captured and used. Elements are sequence-like.
MultiValue
¶
-
class
MultiValue
(value=Unspecified, **kw)¶ Bases:
flatland.schema.containers.Array
,flatland.schema.scalars.Scalar
A transparent homogeneous Container, for multivalued form elements.
MultiValues combine aspects of
Scalar
andSequence
fields, allowing all values of a repeated(key, value)
pair to be captured and used.MultiValues take on the name of their child and have no identity of their own when flattened. Elements are mostly sequence-like and can be indexed and iterated. However the
u
orvalue
are scalar-like, and return values from the first element in the sequence.-
u
¶ The .u of the first item in the sequence, or u’‘.
-
value
¶ The .value of the first item in the sequence, or None.
-