durusmail: quixote-users: New syntax for PTL templates?
New syntax for PTL templates?
2002-10-08
2002-10-08
2002-10-08
2002-10-08
2002-10-09
2002-10-09
2002-10-09
2002-10-09
2002-10-10
PTL for SQL (was Re: [Quixote-users] New syntax for PTL templates?)
2002-10-10
python 2.2 required for widgets
2002-10-28
2002-10-28
2002-10-28
2002-10-28
quote keyword on widget constructors
2002-10-29
2002-10-29
2002-10-29
2002-10-28
2002-10-28
2002-10-29
2002-10-29
2002-10-29
2002-10-10
New syntax for PTL templates?
holger krekel
2002-10-08
Neil Schemenauer wrote:
> I've worked with "Markup" string type for a few days.  Some new syntax
> might be the best way to control how string literals are handled in PTL
> modules.  For the application I'm working on (and I suspect for many
> others), the literal strings in almost all templates should be
> "HTMLMarkup".  We have a few templates that are used for generating
> email.  Those need to have normal string literals.
> [...]
>     def foo(...):
>         """This is a normal function like you would find in a
>         .py module.  String literals are of type 'str'.
>         """
>         ...
>
>     def bar [plain] (...):
>         """This is a template that behaves like current PTL templates.
>         String literals and the return value are of type 'str'.
>         """
>         ...
>
>     def bar [html] (...):
>         """This is a new-style template for generating HTML or XML.
>         String literals and the return value are of type 'HTMLMarkup'.
>         """

Wouldn't it be possible to use "modifiers" like in u'a unicode string'?

How does your new code work with unicode, anyway?

regards,

    holger


reply