[Python-Dev] PEP 292, Simpler String Substitutions

Guido van Rossum guido@python.org
Wed, 19 Jun 2002 20:50:11 -0400


> > > 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.

> Or:
> - get pychecker2 working (the one that does not need to import modules
>   that it checks, I *think* that that is one of the pychecker2 features)
> - get PyChecker in the core
> - provide a python flag to load the pychecker import hook to check your
>   code when running it (say, '-w')
> - have PyChecker warn about "%(name)"-sans-formatting-character
>   instances in strings (if it does not already).

I'd rather have a notation that's less error-prone than a better way
to check for errors.  (Not that PyChecker 2 isn't a great idea. :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)