On 8/15/07, Ron Adam <[EMAIL PROTECTED]> wrote: > After each term is returned from the __format__ call, the results > __format__ method is called with the next specifier. GetTime.__format__ > returns a string. str.__format__, aligns it. A nice left to right > sequence of events.
Is this a pattern that objects should normally follow, or a convention enforced by format itself? In other words, does "{0:abc,def,ghi}".format(value) mean # Assume value.__format__ will delegate properly, to # result1.__format__("def,ghi") # # There are some surprises when a trailing field size gets ignored by # value.__class__. # # Are infinite loops more likely? value.__format__("abc,def,ghi") or # The separator character (","?) gets hard to use in format strings... value.__format__("abc").__format__("def").__format__("ghi") -jJ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com