repr/str diff between Python 2 and 3
Ethan Furman
ethan at stoneleaf.us
Tue Oct 11 23:08:08 EDT 2016
On 10/11/2016 06:30 PM, Skip Montanaro wrote:
>>https://docs.python.org/3/whatsnew/3.1.html
>>
>> It's the third hit when searching for 'float'. Assuming I understand what it's saying. ;)
>
> Thanks. Is that the "David Gay's algorithm"? That seems to apply only to repr(), while the change I observed was in str().
But if __str__ is not defined, __repr__ is used. And I believe that is the case with float. Too lazy to check, though. ;)
--
~Ethan~
More information about the Python-list
mailing list