A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-June/054417.html below:

[Python-Dev] Decimal floats as default (was: discussion about PEP239 and 240)

[Python-Dev] Decimal floats as default (was: discussion about PEP239 and 240) [Python-Dev] Decimal floats as default (was: discussion about PEP239 and 240)Fredrik Johansson fredrik.johansson at gmail.com
Wed Jun 22 22:19:39 CEST 2005
On 6/22/05, Skip Montanaro <skip at pobox.com> wrote:
> If nothing else, extension module code that executes
> 
>     f = PyFloat_AsDouble(o);
> 
> or
> 
>     if (PyFloat_Check(o)) {
>        ...
>     }
> 
> would either have to change or those functions would have to be rewritten to
> accept Decimal objects and convert them to doubles (probably silently,
> because otherwise there would be so many warnings).
> 

Silent conversion was the idea.

> Like Michael wrote, I think this idea is DOA.

Granted, then.

However, keeping binary as default does not kill the other idea in my
proposal, which is to extend the float type to cover decimals instead
of having a separate decimal type. I consider this a more important
issue (contradicting the thread title :-) than whether "d" should be
needed to specify decimal precision.

Fredrik
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4