[Python-Dev] PEP 292, Simpler String Substitutions

Delaney, Timothy tdelaney@avaya.com
Thu, 20 Jun 2002 11:07:05 +1000


> From: Guido van Rossum [mailto:guido@python.org]
> 
> > > > There's a lot of empirical evidence that %(name)s is quite error
> > > > prone.
> > > 
> > > Perhaps an unadorned %(name) should default to %(name)s?
> 
> Ambiguous, hence even more error-prone.

Fair enough. I couldn't off the top of my head think of an ambiguous case,
but of course there's

'%(thing)s'ly-yours' ...

PyChecker2 should *definitely* include checking format strings IMO,
irrespective of whether $ formatting gets in. But only as a warning (because
of the above case).

Tim Delaney