Alex Martelli wrote:
> On Apr 4, 2006, at 8:37 PM, Ian Bicking wrote:
>> Alex Martelli wrote:
>>> As for the % operator, I never liked it -- either a builtin
>>> function, or even better a method of string objects, is going to be
>>> much more readable (and my preference would be to have it take
>>> optional positional arguments, corresponding to {1}, {2}, etc, and
>>> optional named arguments, corresponding to {name} &c).
>>
>> Note that if it takes keyword arguments, but doesn't take a single
>> dictionary-like object (like % and string.Template.substitute do),
>> then you lose any ability to use clever or interesting dictionary-like
>> objects for substitution.
>
> True, that possibility is lost. It remains to be seen if "clever" and
> "interesting" in this context are to be taken _laudatory_ adjectives, or
> tantamount to what Sir Humphrey might ``praise'' as "courageous";-).
Clever and interesting would include my quoting, evaluating, and
formatting wrappers. It might also include special gettext expressions,
case insensitivity, or other interesting wrappers. Also, a dictionary
copy is made everytime you do **, while for string substitution no copy
is really needed.
--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com