[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-13 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset de2a9c98948e by Raymond Hettinger in branch '3.5': Issue #27720: Fix error in eng_to_decimal docs and add examples from the specification. https://hg.python.org/cpython/rev/de2a9c98948e -- ___ Python tra

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 825713d3786a by Raymond Hettinger in branch '2.7': Issue #27720: Fix error in eng_to_decimal docs and add examples from the specification. https://hg.python.org/cpython/rev/825713d3786a -- nosy: +python-dev

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Evelyn Mitchell
Evelyn Mitchell added the comment: Thank you Raymond for a detailed patch update. I will mention that matlab does not support this conversion [1]. R doesn't support engineering notation, either. It may be that this conversion isn't expected to be part of the standard library, and people are

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Stefan Krah
Stefan Krah added the comment: > after reading the bad standard ... Make sure not to buy a Power 6 processor and not to use IEEE 754-2008, because that's essentially what you'll get. IEEE doesn't specify engineering notation though. -- ___ Python t

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Antti Haapala
Antti Haapala added the comment: @Stefan after reading the bad standard I agree that it follows the standard, as unfortunate as it is. However, that part is then also wrong in Raymond's documentation patch. It should be something like: the exponent is adjusted to a multiple of 3 if *any* expo

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Stefan Krah
Stefan Krah added the comment: @Antti The behavior follows this standard: http://speleotrove.com/decimal/decarith.html Nothing we can do about it even if we wanted to. -- ___ Python tracker _

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Antti Haapala
Antti Haapala added the comment: Raymond: your doc patch is not quite right. Decimal('123e1') is converted to Decimal('1.23e3') internally already; so that str(d) will print 1.23e3, scientific notation of that number is '1.23e3' and engineering notation is '1.23e3', thus not a good example. A

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Evelyn. I've refined this a bit to incorporate the more precise wording in the decimal arithmetic specification (see http://speleotrove.com/decimal/daconvs.html ). Also added the missing doctests and synced-up the wording between the docstrings an

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-10 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-10 Thread Evelyn Mitchell
Evelyn Mitchell added the comment: I had to look up what engineering notation meant, so I added detail to the docstring. -- nosy: +Evelyn Mitchell stage: -> patch review Added file: http://bugs.python.org/file44072/patch27720 ___ Python tracker

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-09 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-09 Thread Antti Haapala
New submission from Antti Haapala: https://docs.python.org/3/library/decimal.html#decimal.Context.to_eng_string The docstring for `Context.to_eng_string` says "Converts a number to a string, using scientific notation.", which is, less extra comma, exactly the docstring for `Context.to_sci_stri