Load the grammar tables from a pickle file.
(self, filename: Path)
| 119 | setattr(self, k, v) |
| 120 | |
| 121 | def load(self, filename: Path) -> None: |
| 122 | """Load the grammar tables from a pickle file.""" |
| 123 | with open(filename, "rb") as f: |
| 124 | d = pickle.load(f) |
| 125 | self._update(d) |
| 126 | |
| 127 | def loads(self, pkl: bytes) -> None: |
| 128 | """Load the grammar tables from a pickle bytes object.""" |