Message83571
| Author |
ncoghlan |
| Recipients |
LambertDW, eric.smith, ezio.melotti, gvanrossum, mark.dickinson, ncoghlan, orsenthil, pitrou, terry.reedy |
| Date |
2009年03月14日.02:50:20 |
| SpamBayes Score |
3.1242368e-07 |
| Marked as misclassified |
No |
| Message-id |
<1236999027.92.0.04526453489.issue5237@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Only Formatter.format_field() is particularly hard to override at the
moment (for the same reason that __format__() methods are tricky to
write). That said, creating a locale aware version of string formatting
based on string.Formatter is such an obvious idea that I would actually
be surprised if someone *hasn't* done it by now (they may not have
published it anywhere, but I expect someone has implemented it for their
own use).
That said, I think it's OK for string.Formatter to lag the actual
str.format implementation when it comes to features like this. I see it
as similar to the formatting mini-language parser problem: the primary
goal is to have a good implementation and syntax for str.format, while
providing the tools to allow people to create alternative formatters
with similar power is secondary. |
|