On 1 Oct 2009, at 10:37, M.-A. Lemburg wrote: > Eric Smith wrote: >> Martin v. Löwis wrote: >>> Steven Bethard wrote: >>>> There's a lot of code already out there (in the standard library >>>> and >>>> other places) that uses %-style formatting, when in Python 3.0 we >>>> should be encouraging {}-style formatting. >>> >>> I don't agree that we should do that. I see nothing wrong with using >>> % substitution. > > I agree with Martin. > > Both approaches have their ups and downs, but forcing users to move > from %-formatting to .format()-formatting will just frustrate them: > having to convert several thousand such (working) uses in their code > with absolutely no benefit simply doesn't look like a good way to > spend your time. I agree you cannot force the move to {} format. There are programs that expose the %(name)s in user interfaces for customisation. > > In addition to the code changes, such a move would also render > existing translations of the %-formatted string templates useless. Speaking of translation support has xgettext been updated to support {}? It is a life saver to have xgettext report that "This %s and %s" is not translatable. Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20091004/95c7fd51/attachment.htm>
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