On 9/6/05, Barry Warsaw <barry at python.org> 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/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4