Re: [Python-Dev] Default formatting

2016-10-27 Thread Serhiy Storchaka
On 27.10.16 19:59, Steve Dower wrote: Having the default __format__ behave like this makes me happiest: def __format__(self, fmt): return format(str(self), fmt) My 2c. YMMV. etc. See issue7994 [1] for arguments against this. [1] http://bugs.python.org/issue7994 __

Re: [Python-Dev] Default formatting

2016-10-27 Thread Steve Dower
On 27Oct2016 0251, Serhiy Storchaka wrote: On 27.10.16 02:44, Eric V. Smith wrote: But on the other hand, the existing behavior is well specified and has been around since object.__format__ was added. I'm not sure it needs changing. What's the harm in leaving it? More complicated code. And may

Re: [Python-Dev] Default formatting

2016-10-27 Thread Serhiy Storchaka
On 27.10.16 02:44, Eric V. Smith wrote: But on the other hand, the existing behavior is well specified and has been around since object.__format__ was added. I'm not sure it needs changing. What's the harm in leaving it? More complicated code. And maybe this behavior is less intuitive. It cont