-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntaxerror for working doctest #108
Comments
Looks like a similar issue to #106 but not the exact same. This breaks:
This works
|
I added a fix to this issue in the other parse patch: This issue was to detect this and change the "mode_hint" (which I had a nice change to refactor from an awful non-descriptive name I will not utter here) such that if there was a semicolon in the doctest code it would change from "eval" to "single". This was done in a robust way with the This does add further overhead to the parser (I probably pass the code to tokenize / ast.parse more than is needed, so there is a lot of room to refactor and improve there), but it doesn't seem noticeable yet, and I care about getting correctness right first. Just noting this so I don't forget that the parser does need an efficiency refactor. There is likely a way we would only need to tokenize and run the ast once. If not, I think we can reduce the number of calls to these expensive steps. |
This should be fixed in the released 0.15.9. Please let me know if there is still an issue. |
Hi,
For this code:
I get this:
Maybe a parsing error?
The text was updated successfully, but these errors were encountered: