elements.py 423 B

123456789101112131415161718
  1. from typing import Dict, Optional
  2. class AnchorElement:
  3. __slots__ = ["attrs", "count", "outcount"]
  4. def __init__(self, attrs: Dict[str, Optional[str]], count: int, outcount: int):
  5. self.attrs = attrs
  6. self.count = count
  7. self.outcount = outcount
  8. class ListElement:
  9. __slots__ = ["name", "num"]
  10. def __init__(self, name: str, num: int):
  11. self.name = name
  12. self.num = num