[Python-Dev] PEP 215 redux: toward a simplified consensus?
M.-A. Lemburg
mal@lemburg.com
Mon, 25 Feb 2002 20:25:59 +0100
"Barry A. Warsaw" wrote:
>
> >>>>> "MAL" == M <mal@lemburg.com> writes:
>
> MAL> 1. %% becomes %
>
> MAL> 2. %ident maps to %(ident)s as we have it now
>
> MAL> 3. %{ident} maps to %(ident)s
>
> MAL> 4. %(ident)s continues to have the same semantics as
> MAL> before
>
> What happens to %dogfood or %sickpuppy? If you're trying to maintain
> backwards compatibility with existing syntax, you can't use %ident
> strings.
That's what I was trying to achieve. The only gripe I sometimes
have with '%(ident)s' is that users forget the 's' behind
'%(ident)'; I'd be ok with dropping 2. and only adding 3.
Whatever you do, just please don't mix the old and new
semantics...
'Joe has $ %(a)5.2f in his pocket.' % locals()
is perfectly valid now and should continue to be valid.
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/