A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/048155.html below:

[Python-Dev] Re: Update PEP 292

[Python-Dev] Re: Update PEP 292 [Python-Dev] Re: Update PEP 292Michael 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4