alhambra.EndList¶
-
class
alhambra.EndList(val=[])¶ A list of End instances, which can be merged together, converted to stickydesign.endarray instances, etc.
Methods
merge(endlist2[, fail_immediate, in_place])Given end lists endlist1 and endlist2, merge the two lists, using merge_ends to merge any named ends that are present in both. to_endarrays()Return stickydesign endarrays of each type of (non-hairpin) end. -
__init__(val=[])¶ Create an EndList instance.
Parameters: - val : iterable
an enumerable iterable of objects that can initialize End instances.
Methods
__init__([val])Create an EndList instance. append(value)S.append(value) – append value to the end of the sequence check_consistent()Checks that each name appears only once. clear()copy(/)Return a shallow copy of the list. copy_attributes(t[, memo])count(value)extend(val)S.extend(iterable) – extend sequence by appending elements from the iterable index(value, [start, [stop]])Raises ValueError if the value is not present. insert(idx, val)the comments after the insertion have to move forward keys()merge(endlist2[, fail_immediate, in_place])Given end lists endlist1 and endlist2, merge the two lists, using merge_ends to merge any named ends that are present in both. pop([index])Raise IndexError if list is empty or index is out of range. remove(value)S.remove(value) – remove first occurrence of value. reverse()S.reverse() – reverse IN PLACE sort([key, reverse])Stable sort IN PLACE. to_endarrays()Return stickydesign endarrays of each type of (non-hairpin) end. yaml_add_eol_comment(comment[, key, column])there is a problem as eol comments should start with ‘ #’ (but at the beginning of the line the space doesn’t have to be before the #. yaml_anchor()yaml_end_comment_extend(comment[, clear])yaml_key_comment_extend(key, comment[, clear])yaml_set_anchor(value[, always_dump])yaml_set_comment_before_after_key(key[, …])expects comment (before/after) to be without # and possible have multiple lines yaml_set_start_comment(comment[, indent])overwrites any preceding comment lines on an object expects comment to be without # and possible have multiple lines yaml_set_tag(value)yaml_value_comment_extend(key, comment[, clear])Attributes
anchorcafaformat attribute lctag-