Re: [Python-Dev] User conversions in custom string.Formatter

2011-03-15 Thread Eric Smith
On 03/15/2011 08:07 PM, Andrew Svetlov wrote: As PEP 3101 http://www.python.org/dev/peps/pep-3101/ says (and current Python does) user can specify conversions like "{0!s}". In custom formatters (derived from string.Formatter) he can override convert_field method to add custom conversions. I expe

[Python-Dev] User conversions in custom string.Formatter

2011-03-15 Thread Andrew Svetlov
As PEP 3101 http://www.python.org/dev/peps/pep-3101/ says (and current Python does) user can specify conversions like "{0!s}". In custom formatters (derived from string.Formatter) he can override convert_field method to add custom conversions. I experimented with that last month and found it very