[Python-ideas] Where/how to propose an addition to a standard module?
Steven Bethard
steven.bethard at gmail.com
Mon Oct 13 18:51:27 CEST 2008
On Mon, Oct 13, 2008 at 10:16 AM, Joe Strout <joe at strout.net> wrote:
> >>> from string import Template
> >>> s = Template('$name was born in ${country}')
> >>> print s.match('Guido was born in the Netherlands')
> {'name':'Guido', 'country':'the Netherlands'}
> >>> print s.match('Spam was born as a canned ham')
> None
If I were proposing something like this, I'd be using the new
formatting syntax that's supposed to become the standard in Python
3.0:
http://docs.python.org/dev/3.0/library/string.html#format-string-syntax
That would mean something like::
'{name} was born in {country}'
Steve
--
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
--- Bucky Katt, Get Fuzzy
More information about the Python-ideas
mailing list