[Python-ideas] Settable defaulting to decimal instead of float

M.-A. Lemburg mal at egenix.com
Thu Jan 12 05:47:48 EST 2017


On 12.01.2017 10:04, George Fischhof wrote:
> Hi There,
> 
> Settable defaulting to decimal instead of float
> 
> It would be good to be able to use decimal automatically instead of float
> if there is a setting. For example an environment variable or a flag file.
> 
> Where and when accuracy is more important than speed, the user could set
> this flag, and calculate with decimal numbers as learned in the school.
> 
> I think several people would use this function

I don't think having this configurable is a good idea.
Too much code would break as a result and become unusable
for people wanting to use such functionality, so it would
be of limited value.

The above is similar to what we had in Python 2 for enabling
Unicode literals everywhere (the -U option). It was added as
experiment at the time. No one used it due to the massive
breakage it caused in the stdlib.

Why not explicitly code for your use case ?

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Experts (#1, Jan 12 2017)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> Python Database Interfaces ...           http://products.egenix.com/
>>> Plone/Zope Database Interfaces ...           http://zope.egenix.com/
________________________________________________________________________

::: We implement business ideas - efficiently in both time and costs :::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/
                      http://www.malemburg.com/



More information about the Python-ideas mailing list