class Container:
+ __slots__ = ("children", "child_type")
+
def __init__(self, child_type):
super().__init__()
self.children = []
class SimpleContainer(Container):
+ __slots__ = ("children", "child_type", "namespace", "tag")
+
def __init__(self, child_type, namespace, tag):
super().__init__(child_type)
self.namespace = namespace
class CurrencyContainer(SimpleContainer):
+ __slots__ = ("children", "child_type", "namespace", "tag")
+
def empty_element(self):
from .elements import CurrencyElement
class IDContainer(SimpleContainer):
+ __slots__ = ("children", "child_type", "namespace", "tag")
+
def empty_element(self):
from .elements import IDElement
class StringContainer(SimpleContainer):
+ __slots__ = ("children", "child_type", "namespace", "tag")
+
def empty_element(self):
from .elements import StringElement