Arrays and MultiValues¶
Array¶
-
class
Array(value=Unspecified, **kw)¶ Bases:
flatland.schema.containers.SequenceA 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.ScalarA transparent homogeneous Container, for multivalued form elements.
MultiValues combine aspects of
ScalarandSequencefields, 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
uorvalueare 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.
-