On Thu, 10 Feb 2005 18:22:30 +0100, Abel Daniel <[EMAIL PROTECTED]> wrote: > Bill Mill writes: > > > I get the impression that many pythonistas don't like string > > interpolation. I've never seen a clear definition of why. > >From "import this": > > Explicit is better than implicit. > > And doesn't perl's method mean that you have to escape _every_ > _single_ '$' in strings? I think having to escape '\' is bad enough.
Abel, You've provided me with what is approximately the eleventy-seventh explanation I've gotten as to why string interpolation is bad. I don't think that any of them are "stupid", per se, but neither do I think that any of them are strong enough to be convincing. In my perfect language, string interpolation would be on by default. That said, there are enough reasons to think that it's a bad idea that it is warranted to avoid turning it on by default. I don't mind typing pp("interpolate $mystring"), and although I do wish python standardized it before version 2.4 [1], I hardly even feel that it's a wart in the language. I just wanted to tell the person who wanted string interpolation that it's easy to add into the language and easy to use. One should not take python out of consideration if one feels that string interpolation is a killer feature. Peace Bill Mill bill.mill at gmail.com [1] http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/335308 _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor