[Python-3000] More PEP 3101 changes incoming
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Aug 10 09:32:09 CEST 2007
Ron Adam wrote:
> - alter the value and return (new_value, format_spec)
> - alter the format_spec and return (value, new_format_spec)
> - do logging of some values, and return the (value, format_spec)
> unchanged.
I would ditch all of these. They're not necessary, as
the same effect can be achieved by explicitly calling
another __format__ method, or one's own __format__
method with different args, and returning the result.
> - do something entirely different and return ('', None)
I don't understand. What is meant to happen in that case?
> Does this look ok, or would you do it a different way?
You haven't explained how this addresses the 'r' issue
without requiring every __format__ method to recognise
and deal with it.
--
Greg
More information about the Python-3000
mailing list