Re: [Python-Dev] Numeric alignment issue with PEP 3101

2009-09-14 Thread Raymond Hettinger
And I sort of disagree with saying it's naturally left- or right- aligned; as numbers are naturally (decimal) dot-aligned (if you use dot to separate the whole and fractional part of your number). How about, "naturally aligned by place value". Raymond __

Re: [Python-Dev] Numeric alignment issue with PEP 3101

2009-09-14 Thread Lie Ryan
Raymond Hettinger wrote: I concur. Numbers are naturally right aligned. Isn't numbers are "naturally right aligned" because of the Big Endian notations that most mathematicians currently use. Had we been using Little Endian notation, numbers would be naturally left-aligned, wouldn't they?

Re: [Python-Dev] Numeric alignment issue with PEP 3101

2009-09-08 Thread Eric Smith
> Mark Dickinson wrote: >> I think the alignment for Decimal *does* need to be changed, though. It >> currently left-aligns by default (my fault: I just blindly followed PEP >> 3101 >> without thinking too hard about it). I'd like to fix this for 3.2 and >> 2.7; I'm >> not sure whether it's too

Re: [Python-Dev] Numeric alignment issue with PEP 3101

2009-09-08 Thread Eric Smith
Mark Dickinson wrote: On Mon, Sep 7, 2009 at 11:10 PM, Eric Smith wrote: Hmm, I never noticed that. At this point, I think changing the formatting for any types would break code, so we should just change the documentation to reflect how currently works. I think the alignment for Decimal *does*

Re: [Python-Dev] Numeric alignment issue with PEP 3101

2009-09-08 Thread Mark Dickinson
On Mon, Sep 7, 2009 at 11:10 PM, Eric Smith wrote: > Hmm, I never noticed that. At this point, I think changing the formatting > for any types would break code, so we should just change the documentation > to reflect how currently works. I think the alignment for Decimal *does* need to be changed,

Re: [Python-Dev] Numeric alignment issue with PEP 3101

2009-09-07 Thread Raymond Hettinger
I concur. Numbers are naturally right aligned. On Sep 7, 2009, at 2:46 PM, Eric Smith wrote: The default string formatting alignment for all types, according to PEP 3101, is left aligned. Issue 6857 (http://bugs.python.org/issue6857 ) points out that for numeric types (int, float, and decim

Re: [Python-Dev] Numeric alignment issue with PEP 3101

2009-09-07 Thread Eric Smith
Greg Ewing wrote: Is the new formatting supposed to behave the same way as %-formatting for the same format codes? Because the default for %-formatting is actually right alignment for *all* types, including strings. Hmm, I never noticed that. At this point, I think changing the formatting for

Re: [Python-Dev] Numeric alignment issue with PEP 3101

2009-09-07 Thread Greg Ewing
Eric Smith wrote: Mark Dickinson and I agree that for numeric types, right alignment makes much more sense as a default. And that's what %-formatting and str.format() both do. Is the new formatting supposed to behave the same way as %-formatting for the same format codes? Because the default