3 ms·
If you need to localize, you still have format(). You just happend to have a shorthand to do it for the 80% case, just like you have @decorator as a shortcut fo
by sametmax 11y ago
If you need to localize, you still have format(). You just happend to have a shorthand to do it for the 80% case, just like you have @decorator as a shortcut for decorated = decorator(decorated) or [x for x in z] as a classic loop alternative.
Yes, having so many solutions is not ideal, espacially when it comes to teach the language. However, it would be foolish to avoid improving the usability of Python just to avoir having "one more way to do it".
I do wish they'd deprecate Template though. It's more than useless.
- mixmastamyk 11y agostring.Template is the one used for i18n, it is simple for the end user so has a use.