On Thu, Jun 20, 2002, Gustavo Niemeyer wrote: > > "Serving HTTP on", sa[0], "port", sa[1], "..." This is where current string handling comes up short. What's the correct way to internationalize this string? What if the person handling I18N isn't a Python programmer? I'm sort of caught in the middle here. I can see that in some ways what we currently have isn't ideal, but we've already got problems with strings violating the Only One Way stricture (largely due to immutability vs. "+" combined with .join() vs. % -- fortunately, the use cases for .join() and % are different, so people mostly use them appropriately). It seems to me that fixing the problems with % formatting for newbie Python programmers just isn't worth the pain. It also seems to me that getting better/simpler interpolation support for I18N and similar templating situations is also a requirement. I vote for two things: * String template class for the text module/package that does more-or-less what PEP 292 suggests. I think standardizing string templating would be a Good Thing. I recommend that only one interpolation form be supported; if we're following PEP 292, it should be ${var}. This makes it visually easy for translators to find the variables. * No changes to current string interpolation features unless it's made compatible with % formatting. I don't think I can support dropping % formatting even in Python 3.0; it's not just source code that will have string formats, but also config files and databases. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ Project Vote Smart: http://www.vote-smart.org/
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