Skip to content

Add syntax check to history #306

@hofaflo

Description

@hofaflo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions