fields
Field (๋๋ฆํ) collection.
fields.FieldCollection
collections.fields.FieldCollection(app)doc.fields โ collection of HWP fields (๋๋ฆํ).
Iterates as :class:Field value objects (not bare strings, unlike the v1 list-compat surface). Dict-like subscript by name; numeric subscript gives the nth :class:Field in document order.
Methods
| Name | Description |
|---|---|
| filter | Return the subset of fields for which predicate is truthy. |
| find | Return the :class:Field with name or None. |
| get | Return a fieldโs current value, or default if missing. |
| names | All field names, document order, deduplicated. |
| update | Dict-style batch assignment. |
filter
collections.fields.FieldCollection.filter(predicate)Return the subset of fields for which predicate is truthy.
find
collections.fields.FieldCollection.find(name)Return the :class:Field with name or None.
get
collections.fields.FieldCollection.get(name, default='')Return a fieldโs current value, or default if missing.
names
collections.fields.FieldCollection.names()All field names, document order, deduplicated.
update
collections.fields.FieldCollection.update(mapping=None, **kwargs)Dict-style batch assignment.
fields.Field
collections.fields.Field(app, name)Value object for a single HWP field (๋๋ฆํ).