We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae34680 commit 2a83e88Copy full SHA for 2a83e88
ass/section.py
@@ -92,6 +92,9 @@ def set_data(self, fields):
92
raise ValueError("Fields must be a mutable mapping")
93
self._fields = fields
94
95
+ def __contains__(self, key):
96
+ return key in self._fields
97
+
98
def __getitem__(self, key):
99
return self._fields[key]
100
@@ -110,6 +113,12 @@ def __len__(self):
110
113
def __repr__(self):
111
114
return "{}({!r}, {!r})".format(self.__class__.__name__, self.name, self._fields)
112
115
116
+ def clear(self): # Optional, but should be faster this way
117
+ return self._fields.clear()
118
119
+ def copy(self):
120
+ return self.__class__(self.name, self._fields.copy())
121
122
123
class EventsSection(LineSection):
124
field_order = Dialogue.DEFAULT_FIELD_ORDER
0 commit comments