On Thu, Jul 29, 2010 at 6:30 PM, Raymond Hettinger
wrote:
..
> It also really calls into question whether there are good
> reasons for other types to have a __str__ that is different
> than their __repr__.
For strings, the distinction is very useful. In this and many other
cases unifying str and
On Thu, Jul 29, 2010 at 3:30 PM, Raymond Hettinger
wrote:
> It also really calls into question whether there are good
> reasons for other types to have a __str__ that is different
> than their __repr__.
Maybe, but there is tons of 3rd party code that uses this distinction.
--
--Guido van Rossum
2010/7/29 Raymond Hettinger :
>
>>> When you proposed the idea at EuroPython, it seemed reasonable
>>> but we didn't go into the pros and cons. The downsides include
>>> breaking tests, changing the output of report generating scripts
>>> that aren't using string formatting, and it introduces anot
>> When you proposed the idea at EuroPython, it seemed reasonable
>> but we didn't go into the pros and cons. The downsides include
>> breaking tests, changing the output of report generating scripts
>> that aren't using string formatting, and it introduces another
>> inter-version incompatibilit
On 7/29/2010 4:30 PM, Mark Dickinson wrote:
As you say, it's just one less surprise, and one less thing to
explain: a small shrinkage of the mental footprint of the language.
With this change, I believe the only difference between str(ob) and
repr(ob) will be the addition of quotes. If so, p
On Thu, Jul 29, 2010 at 1:30 PM, Mark Dickinson wrote:
> On Thu, Jul 29, 2010 at 8:16 PM, Raymond Hettinger
> wrote:
>>
>> On Jul 29, 2010, at 11:47 AM, Mark Dickinson wrote:
>>
>>> Now that we've got the short float repr in Python, there's less value
>>> in having float.__str__ truncate to 12 si
On Thu, Jul 29, 2010 at 8:16 PM, Raymond Hettinger
wrote:
>
> On Jul 29, 2010, at 11:47 AM, Mark Dickinson wrote:
>
>> Now that we've got the short float repr in Python, there's less value
>> in having float.__str__ truncate to 12 significant digits (as it
>> currently does). For Python 3.2, I pr
On Jul 29, 2010, at 11:47 AM, Mark Dickinson wrote:
> Now that we've got the short float repr in Python, there's less value
> in having float.__str__ truncate to 12 significant digits (as it
> currently does). For Python 3.2, I propose making float.__str__ use
> the same algorithm as float.__rep
Wiadomość napisana przez Mark Dickinson w dniu 2010-07-29, o godz. 20:47:
> Now that we've got the short float repr in Python, there's less value
> in having float.__str__ truncate to 12 significant digits (as it
> currently does). For Python 3.2, I propose making float.__str__ use
> the same al
On 29/07/2010 19:47, Mark Dickinson wrote:
Now that we've got the short float repr in Python, there's less value
in having float.__str__ truncate to 12 significant digits (as it
currently does). For Python 3.2, I propose making float.__str__ use
the same algorithm as float.__repr__ for its outpu
Now that we've got the short float repr in Python, there's less value
in having float.__str__ truncate to 12 significant digits (as it
currently does). For Python 3.2, I propose making float.__str__ use
the same algorithm as float.__repr__ for its output (and similarly for
complex).
Apart from si
11 matches
Mail list logo