A list of feature values, where each feature value is either a basic
value (such as a string or an integer), or a nested feature
structure.
Feature lists may contain reentrant feature values. A reentrant
feature value is a single feature value that can be accessed via
multiple feature paths. Feature lists may also be cyclic.
Two feature lists are considered equal if they assign the same values
to all features, and have the same reentrances.
See Also:
FeatStruct for information about feature paths,
reentrance, cyclic feature structures, mutability, freezing, and
hashing.
new list
|
__init__(self,
features=( ) )
Create a new feature list, with the specified features. |
source code
|
|
Inherited from list :
__add__ ,
__contains__ ,
__ge__ ,
__getattribute__ ,
__getslice__ ,
__gt__ ,
__iter__ ,
__le__ ,
__len__ ,
__lt__ ,
__mul__ ,
__reversed__ ,
__rmul__ ,
count ,
index
Inherited from object :
__delattr__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|
|
|
|
__delitem__(self,
name_or_path)
If the feature with the given name or path exists, delete its value;
otherwise, raise KeyError . |
source code
|
|
|
__setitem__(self,
name_or_path,
value)
Set the value for the feature with the given name or path to
value . |
source code
|
|
|
|
|
|
|
|
|
|
|
append(L,
object)
append object to end If self is frozen, raise ValueError. |
source code
|
|
|
extend(L,
iterable)
extend list by appending elements from the iterable If self is
frozen, raise ValueError. |
source code
|
|
|
insert(L,
index,
object)
insert object before index If self is frozen, raise ValueError. |
source code
|
|
item
|
pop(L,
index=...)
remove and return item at index (default last) If self is frozen,
raise ValueError. |
source code
|
|
|
remove(L,
value)
remove first occurrence of value If self is frozen, raise ValueError. |
source code
|
|
|
|
|
sort(L,
cmp=None,
key=None,
reverse=False)
stable sort *IN PLACE*; cmp(x, y) -> -1, 0, 1 If self is frozen,
raise ValueError. |
source code
|
|
|
|
Inherited from FeatStruct :
copy
|
|
_keys(self)
Return an iterable of the feature identifiers used by this
FeatStruct. |
source code
|
|
|
_values(self)
Return an iterable of the feature values directly defined by this
FeatStruct. |
source code
|
|
|
_items(self)
Return an iterable of (fid,fval) pairs, where fid is a feature
identifier and fval is the corresponding feature value, for all
features defined by this FeatStruct. |
source code
|
|
|
_repr(self,
reentrances,
reentrance_ids)
Returns:
A string representation of this feature structure. |
source code
|
|
Inherited from FeatStruct :
__repr__
|
Inherited from FeatStruct :
__eq__ ,
__hash__ ,
__ne__ ,
equal_values
|
Inherited from FeatStruct :
freeze ,
frozen
|
Inherited from FeatStruct :
cyclic ,
reentrances ,
walk
|
Inherited from FeatStruct :
remove_variables ,
rename_variables ,
retract_bindings ,
substitute_bindings ,
variables
|
Inherited from FeatStruct :
subsumes ,
unify
|