Skip to content

Represent all templates as python modules, when compiling to python code #31

@riffm

Description

@riffm

Now if an exception is raised in slot of inherited template there is no sane way to know the actual place (line number, source code).

That's sad.

So I propose to compile each template to python module. If a template has base template we just import all stuff from base-template-module at the top.

Benefits::

  • natural "Inheritace" (slots overlaps over slots if there are any)
  • each peace of compiled module code has corresponding lineno and col_offset in mint template
    and in traceback we see the right mint source code and template name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions