On 4/27/21 8:30 AM, Markus Armbruster wrote:
I assume you need this assertion for mypy. If yes, let's get the job
done with minimal fuss. If no, please drop the assertion entirely.
Yep, needed for mypy. You are right that these assertions are for
clarifying postconditions of accept() that tie together the value of
.tok with the type of .val.
I'll replace the message with a better comment, but we do still need either:
(1) A way to make the return from accept() statically type-safe, or
(2) The assertion.
As with most of the patches after part one of this series, I've opted
for the quicker thing to speed us along to a clean mypy baseline.
(Though I have spent some time prototyping solutions for #1...)
--js