Re: [Python-Dev] proposal: evaluated string

2006-04-21 Thread Greg Ewing
tomer filiba wrote: > first of all -- i know there's a bunch of templating engines, but i > think it should be a built-in feature of the language. One fairly serious drawback to this idea is that it inhibits i18n. For security reasons it has to be implemented at compile time and only work on str

Re: [Python-Dev] proposal: evaluated string

2006-04-20 Thread Terry Reedy
"tomer filiba" <[EMAIL PROTECTED] >i don't mean to be rude, Then don't be. Your worst was the silly suggestion in an ad hominen barb that a contributor of many years does not belong on this list. But this time-wasting quibble post, in response to a request to quit wasting everyone's time, c

Re: [Python-Dev] proposal: evaluated string

2006-04-20 Thread tomer filiba
We've said "-1"i don't mean to be rude, but only josiah strictly said -1. by you saying "we", i'd assume you -1'ed it as well, but you couldn't have expected me to know that beforeyou said it. so i feel a little cornered here... is it my fault i don't support quantom superposition?-tomer On 4/20/

Re: [Python-Dev] proposal: evaluated string

2006-04-20 Thread Guido van Rossum
Tomer, please stop. We've seen your proposal. We've said "-1". Please take it instead of wasting your time trying to argue for it. On 4/20/06, tomer filiba <[EMAIL PROTECTED]> wrote: > > > We already have a slew of templating utilities (see Cheetah for example). > > > first of all -- i know there'

Re: [Python-Dev] proposal: evaluated string

2006-04-20 Thread tomer filiba
We already have a slew of templating utilities (see Cheetah for example).first of all -- i know there's a bunch of templating engines, but i think it should be a built-in feature of the language. like boo does. and estr is stronger than simple $name substitution, like Template does. Be sure to stay

Re: [Python-Dev] proposal: evaluated string

2006-04-20 Thread Raymond Hettinger
> >If you don't like the $name style of template markup and prefer >delimiters instead, then check-out the recipe at: > >http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/3053 > > The link should have been: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305306

Re: [Python-Dev] proposal: evaluated string

2006-04-20 Thread Raymond Hettinger
tomer filiba wrote: > many times, templating a string is a tidious task. using the % > operator, either with tuples or dicts, > is difficult to maintain, when the number of templated arguments is > large. and string.Template, > although more easy to read, is less intutive and cumbersome: > > imp

Re: [Python-Dev] proposal: evaluated string

2006-04-20 Thread tomer filiba
just like r"" does the escaping for you.but estr types must be implemented so the evaluate with the current scope (locals and globals),not the score they were defined it, so unless you want to do nasty tricks with sys._getframe, which doesn't work on all implementations of python, you'll need it as

Re: [Python-Dev] proposal: evaluated string

2006-04-20 Thread Josiah Carlson
"tomer filiba" <[EMAIL PROTECTED]> wrote: > the evaluated string will be evaluated based on the current scope (locals > and globals), just like > normal expressions. the difference is, the results of the expressions will > be str()ed into the > evaluated string directly. these expressions will be

[Python-Dev] proposal: evaluated string

2006-04-20 Thread tomer filiba
many times, templating a string is a tidious task. using the % operator, either with tuples or dicts,is difficult to maintain, when the number of templated arguments is large. and string.Template,although more easy to read, is less intutive and cumbersome: import stringt = string.Template("hello $n