Roundup Robot added the comment:
New changeset c2f827af02a2 by Stefan Krah in branch 'default':
Issue #10650: Remove the non-standard 'watchexp' parameter from the
http://hg.python.org/cpython/rev/c2f827af02a2
--
___
Python tracker
Roundup Robot added the comment:
New changeset e4ca4edee8bd by Stefan Krah in branch 'default':
Closes #10650: Deprecate the watchexp parameter of Decimal.quantize().
http://hg.python.org/cpython/rev/e4ca4edee8bd
--
___
Python tracker
Stefan Krah added the comment:
Here's a patch deprecating watchexp.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10650
___
___
Changes by Stefan Krah stefan-use...@bytereef.org:
--
keywords: +patch
Added file: http://bugs.python.org/file26996/issue10650.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10650
___
Stefan Krah stefan-use...@bytereef.org added the comment:
watchexp was available in rescale() from the beginning ...
http://svn.python.org/view/sandbox/trunk/decimal/Decimal.py?revision=40721view=markup
... and rescale() was renamed to quantize() in
Stefan Krah stefan-use...@bytereef.org added the comment:
Ping. We have to decide if we need watchexp in _decimal. I've left it
out so far since all I can gather from the docs is that it somehow
behaves like _rescale.
Can we deprecate it and replace it by a proper rescale?
--
nosy:
Mark Dickinson dicki...@gmail.com added the comment:
I'd be happy to see watchexp deprecated. It feels like a leftover
implementation artefact; its behaviour isn't properly defined anywhere, and as
far as I can tell it has only a single testcase.
--
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
Does anyone know why watchexp was put there in the first place?
http://speleotrove.com/decimal/daops.html#refquant
If no motivation for this can be found, I agree with Mark that it should be
deprecated and removed.
--
New submission from Stefan Krah stefan-use...@bytereef.org:
I'm not sure if this is a documentation issue or a bug. If watchexp=0,
quantize() also allows any number of digits:
x = Decimal(6885998238912213556789006667970467609814)
y = Decimal(1e2)
x.quantize(y)
Traceback (most recent call
Stefan Krah stefan-use...@bytereef.org added the comment:
NaNs, however, are decapitated:
x = Decimal(NaN5357671565858315212612021522416387828577)
y = 0
x.quantize(y, watchexp=0)
Decimal('NaN8315212612021522416387828577')
--
___
Python tracker
10 matches
Mail list logo