On 3/13/07, Josiah Carlson <[EMAIL PROTECTED]> wrote:
>
> "Patrick Maupin" <[EMAIL PROTECTED]> wrote:
> > Feature:  Alternate syntaxes for escape to markup.

> > this method "{foo}" escapes to markup, but when there is whitespace
> > after the leading "{",  e.g. "{ foo}", the brace is not an escape to
> > markup.  If the whitespace is a space, it is removed from the output,
> > but if it is '\r', '\n', or '\t', then it is left in the output.

I can see it being very useful.  But if I'm using strings that long,
and ready to be picky about whitespace -- I'm ready to import a
module.  To me, this looks like a good example Template extension.

> can't help but think that %var% would be a better alternate explicit

Some of the same documents that have lots of "{" characters will have
lots of "%".
Again, Template will let you change the identifier character quite easily.

> > Feature:  Ability to insert non-printing comments in format strings

> The user can use the parser/compiler to get this behavior for free.

>     (" text " #your comment here
>      "more text").format(...)

If the only alternative were really to push more on eval and to
obfuscate code (did you *mean* to stick those together, or did you
forget a comma?) ... I would support this.

Since we do already have String.template, maybe the answer is to
somehow promote it.

-jJ
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to