You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to compare a variable set to None with a Symbol, Lark's implementation of __eq__ within the Symbol class raises an AssertionError.
To Reproduce
fromlark.grammarimportSymbola=Noneb=Symbol("abc")
# this throws an error:a==b
The error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "[...]/venv/lib/python3.8/site-packages/lark/grammar.py", line 19, in __eq__
assert isinstance(other, Symbol), other
AssertionError: None
The text was updated successfully, but these errors were encountered:
Describe the bug
When attempting to compare a variable set to
None
with a Symbol, Lark's implementation of__eq__
within theSymbol
class raises anAssertionError
.To Reproduce
The error message:
The text was updated successfully, but these errors were encountered: