[Python-Dev] s1 == (sf % (s1 / sf))? A bad idea?
Peter Funk
pf@artcom-gmbh.de
Tue, 3 Apr 2001 10:35:02 +0200 (MEST)
Guido van Rossum:
> Peter, if you can do a prototype implementation (in Python would be
> best), the idea might be received better.
I believe a strawman derived from the UserString class could be done
in pure Python. But I'm sorry: I've no time for this during April.
I'm also not sure, whether this is really a worthwile effort and whether
I should champion this idea further. From Pauls response I got the
impression that people already consider the '%' string interpolation
operator as a language wart rather than an elegant feature.
I however often like the infix notation better.
That may be a matter of taste. Imagine we would have to write:
"%5d %20s %s\n".printf((num, name, adr))
instead of
"%5d %20s %s\n" % (num, name, adr)
I'm happy, that this is not the case in todays Python.
Regards, Peter
--
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany, Fax:+49 4222950260
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen, Germany)