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
During development, it would be convenient if the history was checked for syntax errors. This can be implemented with the built-in function compile. Here's a basic example for this function:
>>> compile("a = 1\n b=2", "history", "exec")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "history", line 2
b=2
IndentationError: unexpected indent
The text was updated successfully, but these errors were encountered:
Not really, since it requires to perform actions which create history entries. The use case I had in mind was more like this: You're in the process of implementing a new feature. In the line that adds the history entry, you miss a closing parenthesis. Since it's inside a string, the typo isn't obvious in the text editor. Trying out the new feature in the GUI, the history entry is created and directly checked for syntactic correctness.
Of course this will only help to catch a small group of errors, but it might be helpful nonetheless.
During development, it would be convenient if the history was checked for syntax errors. This can be implemented with the built-in function
compile
. Here's a basic example for this function:The text was updated successfully, but these errors were encountered: