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.
Migrated issue, originally created by Michael Bayer (@zzzeek)
the use of the end-of-line continuation
(backslash) syntax
can result in the generated python module for a template to contain unnecessary
calls to write empty strings.
import mako.template
print mako.template.Template("<% pass %>\\\nFoo").code
...
# SOURCE LINE 1
pass
__M_writer(u'')
# SOURCE LINE 2
__M_writer(u'Foo')
...
I believe these calls __M_writer(u'') are unnecessary. I have a few
templates that
use a lot of line continuations and so I see a lot of these in the
generated code.
A really simple change in mako/lexer.py appears to optimize these calls away
(patch is against the 0.3.6 candidate, tag Mako-c8598ab628a0da0d55857196627753dad9849a39):
Migrated issue, originally created by Michael Bayer (@zzzeek)
the use of the end-of-line continuation
(backslash) syntax
can result in the generated python module for a template to contain unnecessary
calls to write empty strings.
I believe these calls
__M_writer(u'')
are unnecessary. I have a fewtemplates that
use a lot of line continuations and so I see a lot of these in the
generated code.
A really simple change in mako/lexer.py appears to optimize these calls away
(patch is against the 0.3.6 candidate, tag Mako-c8598ab628a0da0d55857196627753dad9849a39):
The text was updated successfully, but these errors were encountered: