On 9/6/05, Barry Warsaw <[EMAIL PROTECTED]> wrote: > printf('$1 forgot to frobnicate the $2!\n', username, file.name, > to=sys.stderr) > > While that's a little less self-descriptive for a translator to deal > with (who would only see the string, not the call site), it certainly > looks nicer for a non-i18n application, and could certainly work for an > i18n app too. It's a neat idea worth exploring.
Is it worth doing this and completely dropping the %-based formats in Py3k? (Just asking -- it might be if we can get people to get over the shock of $ becoming first class ;-). > Also, I think you posted in a separate article a syntactic proposal for > including detailed formating in $-vars. ${varname:fmt} where 'varname' > could be an identifier a la PEP 292 or possibly a positional argument. +1 I proposed ${varname%fmt} earlier but it prevents you to extend the varname syntax to arbitrary expressions, which I think is an extension that will get lots of requests. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com