Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Alexander Belopolsky
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

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Guido van Rossum
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

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Benjamin Peterson
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

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread 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 another >> inter-version incompatibilit

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Terry Reedy
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

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Guido van Rossum
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

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Mark Dickinson
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

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Raymond Hettinger
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

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Łukasz Langa
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

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Michael Foord
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

[Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Mark Dickinson
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