[issue8257] Decimal constructor to accept float

2010-04-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- priority: - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8257 ___ ___ Python-bugs-list

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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 rep...@bugs.python.org

[issue8257] Decimal constructor to accept float

2010-04-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: And yes, I agree that Fraction(somedecimal) should work too. What about Fraction(1.1)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8257

[issue8257] Decimal constructor to accept float

2010-03-29 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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-29 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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:

[issue8257] Decimal constructor to accept float

2010-03-29 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: (Assuming “no place” means “no reason”) Apart from TOOTDI, there is indeed none. Regards -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8257

[issue8257] Decimal constructor to accept float

2010-03-28 Thread Raymond Hettinger
New submission from Raymond Hettinger rhettin...@users.sourceforge.net: 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:

[issue8257] Decimal constructor to accept float

2010-03-28 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8257 ___ ___ Python-bugs-list mailing