Steven Bethard <steven.bethard <at> gmail.com> writes: > > If %-formatting is to be deprecated, the transition strategy here > is trivial. However, no one has yet written translators, and it is > not clear what heuristics should be used, e.g. should the method > just try %-formatting first and then {}-formatting if it fails?
This would be a reasonable heuristic. It should be done only on the first call, though, and then the result remembered (for both performance reasons and consistency). The cases where a format string would function in both formatting styles and expect the same parameters must be very rare in the real world. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com