Keith wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
I think it's a good idea. I regularly type numbers into my pocket calculator
just to do this conversion.
Eike.
--
On 04/27/10 10:36, Keith wrote:
I think it's worth making the print statement (or print function, as
the case may be) let us do engineering notation, just like it lets us
specify scientific notation.
The print statement/function does no magic at all in specifying how
numbers look like when.
On 04/27/10 10:47, MRAB wrote:
Mark Dickinson wrote:
On Apr 26, 4:36 am, Keith keith.braff...@gmail.com wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
[...]
I am thinking that if we simply added something
Keith wrote:
I kinda like m for the whole Greco-
Roman angle, now that you point it out :-)
I like m, too.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 27, 2:16 am, Keith keith.braff...@gmail.com wrote:
On Apr 26, 8:47 pm, MRAB pyt...@mrabarnett.plus.com wrote:
t for powers of a thousand, perhaps? (Or m?)
Both of those letters are fine. I kinda like m for the whole Greco-
Roman angle, now that you point it out :-)
By the way,
On Apr 25, 10:19 pm, Chris Rebert c...@rebertia.com wrote:
On Sun, Apr 25, 2010 at 9:42 PM, Keith keith.braff...@gmail.com wrote:
On Apr 26, 12:02 am, Chris Rebert c...@rebertia.com wrote:
On Sun, Apr 25, 2010 at 8:36 PM, Keith keith.braff...@gmail.com wrote:
I am considering writing a PEP
On Apr 27, 9:03 am, Mark Dickinson dicki...@gmail.com wrote:
On Apr 27, 2:16 am, Keith keith.braff...@gmail.com wrote:
On Apr 26, 8:47 pm, MRAB pyt...@mrabarnett.plus.com wrote:
t for powers of a thousand, perhaps? (Or m?)
Both of those letters are fine. I kinda like m for the whole
On 4/25/2010 11:36 PM, Keith wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
I tested that input is no problem, so the only question is output.
Do you think this idea has enough merit to make it to PEP
Chris Rebert c...@rebertia.com wrote:
c = decimal.Context(prec=5)
decimal.Decimal(1234567).to_eng_string(c)
'1234567'
That is not an engineering notation string.
Apparently either you and the General Decimal Arithmetic spec differ
on what constitutes engineering notation, there's a
Keith keith.braff...@gmail.com wrote:
Even though this uses the to_eng_string() function, and even though I
am using the decimal.Context class:
c = decimal.Context(prec=5)
decimal.Decimal(1234567).to_eng_string(c)
'1234567'
That is not an engineering notation string.
To clarify
On 2010-04-26, Keith keith.braff...@gmail.com wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
I very regularly do something similar in various apps, though I often
want to specify the exponent (e.g. I always
On Apr 26, 4:36 am, Keith keith.braff...@gmail.com wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
[...]
I am thinking that if we simply added something like %n (for eNgineer)
to the list of format
On Apr 26, 6:47 am, Keith keith.braff...@gmail.com wrote:
From that document it appears that my decimal.Decimal(1234567) example
shows that the module has a bug:
Doc says:
[0,123,3] === 123E+3
But Python does: import decimal
decimal.Decimal(123000).to_eng_string()
'123000'
That's not
Apparently either you and the General Decimal Arithmetic spec differ
on what constitutes engineering notation, there's a bug in the Python
decimal library,
You've distilled it precisely, and as you've shown in a different
post, it's the former.
The Python decimal module seems to implement
On Apr 26, 5:33 am, Stefan Krah stefan-use...@bytereef.org wrote:
Keith keith.braff...@gmail.com wrote:
Even though this uses the to_eng_string() function, and even though I
am using the decimal.Context class:
c = decimal.Context(prec=5)
decimal.Decimal(1234567).to_eng_string(c)
Mark Dickinson wrote:
On Apr 26, 4:36 am, Keith keith.braff...@gmail.com wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
[...]
I am thinking that if we simply added something like %n (for eNgineer)
to the
On Apr 26, 7:56 pm, Mark Dickinson dicki...@gmail.com wrote:
On Apr 26, 6:47 am, Keith keith.braff...@gmail.com wrote:
From that document it appears that my decimal.Decimal(1234567) example
shows that the module has a bug:
Doc says:
[0,123,3] === 123E+3
But Python does: import
On Apr 26, 8:47 pm, MRAB pyt...@mrabarnett.plus.com wrote:
t for powers of a thousand, perhaps? (Or m?)
Both of those letters are fine. I kinda like m for the whole Greco-
Roman angle, now that you point it out :-)
--Keith Brafford
--
http://mail.python.org/mailman/listinfo/python-list
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
Background (for those who don't already know about engineering
notation):
Engineering notation (EN) is type of floating point representation.
The idea with EN is that the
On Sun, Apr 25, 2010 at 8:36 PM, Keith keith.braff...@gmail.com wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
Background (for those who don't already know about engineering
notation):
Engineering notation
On Sun, 25 Apr 2010 20:36:22 -0700, Keith wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
[...]
For instance, no one talks about 4.7e-5F, as they would rather see 47e-6
(micro). Instead of 2.2e-2, engineers
On Apr 26, 12:02 am, Chris Rebert c...@rebertia.com wrote:
On Sun, Apr 25, 2010 at 8:36 PM, Keith keith.braff...@gmail.com wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and would appreciate input from others.
snip
Relevant related information:
On Apr 26, 12:29 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Sun, 25 Apr 2010 20:36:22 -0700, Keith wrote:
no one talks about 4.7e-5F, as they would rather see 47e-6
(micro). Instead of 2.2e-2, engineers need to see 22.0e-3 (milli).
I'd be cautious about making claims
On Sun, Apr 25, 2010 at 9:42 PM, Keith keith.braff...@gmail.com wrote:
On Apr 26, 12:02 am, Chris Rebert c...@rebertia.com wrote:
On Sun, Apr 25, 2010 at 8:36 PM, Keith keith.braff...@gmail.com wrote:
I am considering writing a PEP for the inclusion of an engineering
format specifier, and
On Mon, Apr 26, 2010 at 3:19 PM, Chris Rebert c...@rebertia.com wrote:
Apparently either you and the General Decimal Arithmetic spec differ
on what constitutes engineering notation, there's a bug in the Python
decimal library, or you're hitting some obscure part of the spec's
definition. I
On Sun, Apr 25, 2010 at 10:25 PM, Xavier Ho cont...@xavierho.com wrote:
On Mon, Apr 26, 2010 at 3:19 PM, Chris Rebert c...@rebertia.com wrote:
Apparently either you and the General Decimal Arithmetic spec differ
on what constitutes engineering notation, there's a bug in the Python
decimal
On Apr 26, 1:19 am, Chris Rebert c...@rebertia.com wrote:
Apparently either you and the General Decimal Arithmetic spec differ
on what constitutes engineering notation, there's a bug in the Python
decimal library, or you're hitting some obscure part of the spec's
definition.
snip
The
On Mon, Apr 26, 2010 at 3:39 PM, Chris Rebert c...@rebertia.com wrote:
The conversion **exactly follows the rules for conversion to
scientific numeric string** except in the case of finite numbers
**where exponential notation is used.**
Well, then maybe the conversion doesn't exactly follow
28 matches
Mail list logo