This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Decimal compatability with float

  • Free software: BSD license

Features

Implicit float-to-Decimal coercion for arithmetic operations.

Instead of this:

>>> from decimal import Decimal
>>> Decimal(12.0) * 0.5
TypeError: unsupported operand type(s) for *: 'Decimal' and 'float'

Use FDecimal:

>>> from fdecimal import FDecimal
>>> FDecimal(12.0) * 0.5
Decimal('6.0')

As you can see it only solves part of the problem - the result still can’t be added with a float value without explicit type coercion, but it solves some problems where (1) its not clear what type the other value will be, (2) you don’t want to add code explicitly handling that coercion, and (3) an arithmetic surprises due to working with different numeric types are acceptable.

TODO

  • Missing operations, including mod, floor div
  • Python 3 support
  • Allow cdecimal swap-in

Done:

  • Return FDecimal objects rather than Decimal objects

History

0.2.0 (2016-01-14)

  • Add support for returning FDecimal objects from operations

0.1.0 (2016-01-14)

  • First release on PyPI.
Release History

Release History

0.2.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
fdecimal-0.2.0-py2.py3-none-any.whl (5.7 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jan 14, 2016
fdecimal-0.2.0.tar.gz (6.7 kB) Copy SHA256 Checksum SHA256 Source Jan 14, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting