[issue8257] Decimal constructor to accept float

2010-04-06 Thread Mark Dickinson
Mark Dickinson added the comment: The decimal changes were implemented by Raymond in r79609 (trunk) and r79602 (py3k). For the fractions module changes, see issue 8294. -- assignee: mark.dickinson -> resolution: -> accepted stage: patch review -> committed/rejected status: open -> c

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Mark Dickinson
Mark Dickinson added the comment: > And yes, I agree that Fraction(somedecimal) should work too. What about Fraction(1.1)? -- ___ Python tracker ___

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Mark Dickinson
Mark Dickinson added the comment: > Mark, I do think we should have decimal+float-->float in 2.7 also. That's fine with me in principle. But isn't 2.7 in feature freeze from tomorrow? -- ___ Python tracker _

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Added the requires decorator as requested. Committed in r79602. Will backport to 2.7 this weekend. And yes, I agree that Fraction(somedecimal) should work too. It would be weird to have Fraction("1.1") work but not Fraction(Decimal("1.1")). Mark, I do th

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Mark Dickinson
Mark Dickinson added the comment: Raymond, do you want this to go into 2.7 as well? I'm assuming that we're not going to allow mixed-type float+decimal operations in 2.7. Also, if we're doing this, it seems to me that all the reasons you give for the Decimal constructor accepting floats also

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Mark Dickinson
Changes by Mark Dickinson : -- priority: -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue8257] Decimal constructor to accept float

2010-03-29 Thread Éric Araujo
Éric Araujo added the comment: (Assuming “no place” means “no reason”) Apart from TOOTDI, there is indeed none. Regards -- ___ Python tracker ___ __

[issue8257] Decimal constructor to accept float

2010-03-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Éric, there is no place to deprecate Decimal.from_float(). It will be redundant but there is no need to break working code. Also, it has the nice property of being explicit about what it is doing. Link to my proposal: http://mail.python.org/pipermail/

[issue8257] Decimal constructor to accept float

2010-03-29 Thread Éric Araujo
Éric Araujo added the comment: Will Decimal.from_float be deprecated and eventually removed? Could you provide a link to said discussion thread for us outsiders? :) Regards -- nosy: +merwok ___ Python tracker ___

[issue8257] Decimal constructor to accept float

2010-03-28 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8257] Decimal constructor to accept float

2010-03-28 Thread Raymond Hettinger
New submission from Raymond Hettinger : Per discussion on python-dev, let Decimal(x) accept floats as a possible input, making Decimal.from_float unnecessary. See attached patch. -- assignee: mark.dickinson files: deci_float_constructor.diff keywords: easy, patch messages: 101882 nosy: