mint icon indicating copy to clipboard operation
mint copied to clipboard

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

Open riffm opened this issue 14 years ago • 0 comments

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

riffm avatar Aug 02 '11 11:08 riffm