|
From: | John Snow |
Subject: | Re: [PATCH 05/22] qapi/parser: Assert lexer value is a string |
Date: | Tue, 27 Apr 2021 09:58:36 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |