On Sat, 20 Dec 2008 01:54:35 +0000, Steven D'Aprano wrote: > There clearly is a need for a more heavyweight formatting solution than > % and string.Template. There are things that can't be done easily with % > alone, and format() will make them much simpler. I have no objection to > the addition of the format() method (although I wonder whether it might > have been better as a function).
Except of course there is a format() function. Like len(), str() etc, it just calls the appropriate special method on the argument: format(obj, format_spec) -> obj.__format__(format_spec) -- Steven -- http://mail.python.org/mailman/listinfo/python-list