Ron Adam wrote: > If the string __format__ method got 'k10' as a format specifier, it has > no idea what the 'k10' is suppose to mean, it needs to make a choice to > either fall back to str(), or raise an exception that could be caught > and handled.
I think Guido's scheme handles this okay. Each type's __format__ decides whether it can handle the format spec, and if not, explicitly delegates to something else such as str(self).__format__. Eventually you will get to a type that either understands the format or has nowhere left to delegate to and raises an exception. -- Greg _______________________________________________ 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