[Python-Dev] Decimal <-> float comparisons in py3k. (original) (raw)
Mark Dickinson dickinsm at gmail.com
Wed Mar 17 14:40:41 CET 2010
- Previous message: [Python-Dev] Decimal <-> float comparisons in py3k.
- Next message: [Python-Dev] Decimal <-> float comparisons in py3k.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Mar 16, 2010 at 10:32 PM, Steven D'Aprano <steve at pearwood.info> wrote:
On Wed, 17 Mar 2010 03:23:30 am Mark Dickinson wrote:
On Tue, Mar 16, 2010 at 4:11 PM, Mark Dickinson <dickinsm at gmail.com> wrote: [...]
>>>> Decimal.fromfloat(1.1) == 1.1 > > False Whoops. To clarify, this is the pre-patch behaviour; post-patch, this gives True. Whew! You had me worried there for a second. Just to clarify, you are proposing: Decimal.fromfloat(1.1) == 1.1 Decimal.('1.1') != float('1.1')
Exactly, yes.
-- Mark
- Previous message: [Python-Dev] Decimal <-> float comparisons in py3k.
- Next message: [Python-Dev] Decimal <-> float comparisons in py3k.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]