[Python-3000] [Python-Dev] Rounding Decimals
jyasskin at gmail.com
Mon Jan 7 06:54:30 CET 2008
On Jan 6, 2008 7:40 PM, Raymond Hettinger <python at rcn.com> wrote:
> [Jeffrey Yasskin]
> > The other 3 methods
> > specified by PEP 3141 aren't strictly necessary for 2.6, but they will
> > be needed for 3.0. I'd rather not make the two versions of Decimal
> > gratuitously different, so this patch puts them in the 2.6 version
> > too.
> If I understand you correctly, then the patch backports magic methods that do not have corresponding invocation methods in Py2.6.
> So, they are basically useless. If that's true, then the patch is clutter -- it makes 2.6 less desirable. It is not obvious to me
> how this will help someone transition to Py3.0. I'm curious to hear how Guido makes the call on this.
> Also, the goal of keeping versions identical across 2.6 and 3.0 is at odds with previous discussions where I believe we said that
> that is *not* the goal and will likely not even be possible in many cases. Besides, if the invocation of the magic methods is
> different in 3.0, how are you going to keep the test suite code the same across versions?
Given Guido's agreement, expect another version of this patch with
> There should probably be a PEP sets clearer guidelines about what should be backported from Py3.0. Perhaps something like this:
> * If there is a new feature that can be implemented in both and will make both more attractive, then it should be in both.
> * If something is going away or changing in 3.0, then the 2.6 conversion tool mode should warn about it if possible.
> * If neither of the above apply, then leave 2.6 alone.
> > I'm not
> > sure exactly what you're objecting to. Could you be more precise?
> You note said: "I'll implement Context.round() in a separate patch. Comment away."
Oh, sorry for not being clear then. I don't intend to write or discuss
that separate patch until this one's approved and submitted. I think
it's worth discussing eventually, but this change is more important. I
mentioned this sentiment at http://bugs.python.org/msg59417 too, but
clearly wasn't explicit enough in either case.
More information about the Python-3000