[Python-Dev] Re: Update PEP 292
Michael Hudson
mwh at python.net
Fri Aug 20 17:03:14 CEST 2004
Barry Warsaw <barry at python.org> writes:
> On Thu, 2004-08-12 at 02:05, Andrew Durdin wrote:
>> One thing the PEP doesn't make clear: do these templates only
>> interpolate string variables, or will they handle anything with a
>> __str__ method?
>>
>> e.g., will the following raise an exception:
>>
>> print Template("I am ${height} centimetres tall.") % {height: 183}
>
> In the current implementation, this will raise an exception.
What, like a NameError for height? :-)
Sorry,
mwh
--
I can't see a conspicuous evolutionary advantage in being good
at higher mathematics. -- James Riden, asr
More information about the Python-Dev
mailing list