[ANN] istring 1.0.1 released; announce list created

Paul Rubin phr-n2002a at nightsong.com
Fri Mar 8 08:53:11 EST 2002


Michael Ströder <michael at stroeder.com> writes:
> I have to admit that I'm scared of having to deal with yet another
> special char $ which would need quoting. Since the istring approach
> does not add any more value to Python the developers in favor of this
> should use the istring module. But it should not be added to standard
> Python.

Of course it adds more value to Python.  If you've programmed in Perl
and then switched to Python, you're probably delighted like me to be
free of a lot of Perl ugliness, but interpolation is something that
I sorely miss.

It's better to do it as a language extension than as a library,
because that way the compiler can parse the interpolated strings and
emit bytecode for them directly, rather than having to do some messy
runtime parsing.  If it has to be done as a library, it should at
least be a C extension rather than pure Python (I don't know which the
istring module is).

IMO, Python's "format_string % varlist" hack is excessively cute and
can be done without.  I'd rather have interpolation in the language
and a printf-like function in the library.



More information about the Python-list mailing list