Whole file

lark-parser/lark

The author described this change as Fix Symbol.__eq__ (fixes #1476). It counts as a record because the check below fails on the code as it stood at 24d0cf7b5 and passes on da118c3c7, with nothing else changed between the two runs.

Fix saved2024-10-25
Sharing licenceMIT · LICENSE
Change size+2 1

What the code was meant to do, written into the code itself as a save note

Fix Symbol.__eq__ (fixes #1476)

The change

1616 self.name = name
1717
1818 def __eq__(self, other):
19- assert isinstance(other, Symbol), other
19+ if not isinstance(other, Symbol):
20+ return False
2021 return self.is_term == other.is_term and self.name == other.name
2122
2223 def __ne__(self, other):

The check that tells the two apart

failpass·tests/test_grammar.py::TestGrammar::test_symbol_eq

Check file tests/test_grammar.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it24d0cf7b5b56db77203dbbe794e50958433130ea
Broken version dated2024-09-23
Modulelark.grammar
Units changedSymbol
Fingerprintb20260bd5ab1045d
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in lark-parser/lark