Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Guido van Rossum
On Wed, Aug 31, 2016 at 8:57 PM, Stephen J. Turnbull wrote: > Random832 writes: > > > Also, interesting quirk - it always rounds up. 1025 bytes is "1.1K", and > > in SI mode, 1001 bytes is "1.1k" > > That seems to be right approach: in system administration,

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Ken Kundert
All, Armed with all of your requirements, suggestions and good ideas, I believe I am ready to try to put something together. Thank you all, and once again let me apologize for 'all the drama'. I'll let you know when I have something. -Ken ___

Re: [Python-ideas] real numbers with SI scale factors

2016-08-31 Thread Nikolaus Rath
On Aug 29 2016, Ken Kundert wrote: > Nikolaus, > I have belatedly realized that this kind of hyperbole is counter > productive. > So let me back away from that statement and instead try to understand your > reasons for not liking the proposal. > > Do you think there is no value to be able

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Eric V. Smith
On 08/31/2016 01:07 PM, MRAB wrote: > On 2016-08-31 17:19, Guido van Rossum wrote: >> On Wed, Aug 31, 2016 at 5:21 AM, Nick Coghlan wrote: >>> "h" would be a decent choice - it's not only a continuation of the >>> e/f/g pattern, it's also very commonly used as a command line

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Random832
On Wed, Aug 31, 2016, at 12:19, Guido van Rossum wrote: > On Wed, Aug 31, 2016 at 5:21 AM, Nick Coghlan wrote: > > "h" would be a decent choice - it's not only a continuation of the > > e/f/g pattern, it's also very commonly used as a command line flag for > > "human-readable

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Random832
On Wed, Aug 31, 2016, at 13:43, Random832 wrote: > And the actual -h behavior of those system utilities you mentioned is > "123k", "1.2M", "12M", with the effect being that the value always fits > within a four-character field width, but this isn't a fixed number of > decimal places *or*

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Chris Angelico
On Wed, Aug 31, 2016 at 2:08 PM, Ken Kundert wrote: > > What's the mnemonic here? Why "r" for scale factor? > > My thinking was that r stands for real like f stands for float. > With the base 2 scale factors, b stands for binary. "Real" has historically often been a

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Ken Kundert
Thanks Chris. I had misunderstood Steve's request, and I was thinking of something much more complicated. Your code is very helpful. -Ken On Wed, Aug 31, 2016 at 05:07:11PM +1000, Chris Angelico wrote: > On Wed, Aug 31, 2016 at 2:08 PM, Ken Kundert > wrote: > >

Re: [Python-ideas] real numbers with SI scale factors

2016-08-31 Thread Erik Bray
On Tue, Aug 30, 2016 at 5:48 AM, Ken Kundert wrote: > Erik, > One aspect of astropy.units that differs significantly from what I am > proposing is that with astropy.units a user would explicitly specify the scale > factor along with the units, and that scale

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Guido van Rossum
On Wed, Aug 31, 2016 at 5:21 AM, Nick Coghlan wrote: > On 31 August 2016 at 17:07, Chris Angelico wrote: >> On Wed, Aug 31, 2016 at 2:08 PM, Ken Kundert >> wrote: >>> > What's the mnemonic here? Why "r" for scale factor? >>> >>>

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread MRAB
On 2016-08-31 05:08, Ken Kundert wrote: What's the mnemonic here? Why "r" for scale factor? My thinking was that r stands for real like f stands for float. With the base 2 scale factors, b stands for binary. 'b' already means binary: >>> '{:b}'.format(100) '1100100'

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread MRAB
On 2016-08-31 17:19, Guido van Rossum wrote: On Wed, Aug 31, 2016 at 5:21 AM, Nick Coghlan wrote: On 31 August 2016 at 17:07, Chris Angelico wrote: On Wed, Aug 31, 2016 at 2:08 PM, Ken Kundert wrote: > What's the mnemonic