New Python 3.0 string formatting - really necessary?
stefan_ml at behnel.de
Sat Dec 20 11:27:24 CET 2008
Steven D'Aprano wrote:
> I have no objection to
> the addition of the format() method (although I wonder whether it might
> have been better as a function).
I actually learned about the String.format() method in Java a while after
having read about str.format() in Python, and my first reaction was to
recognise how stupid you'd have to be to make that a static method that
ignores the string it's called on. :)
I think '...'.format() makes sense given that we already have '...'.join().
More information about the Python-list