[Python-ideas] Python Float Update

random832 at fastmail.us random832 at fastmail.us
Tue Jun 2 14:44:02 CEST 2015

On Tue, Jun 2, 2015, at 08:34, Nick Coghlan wrote:
> For decimal, the issues that keep it from becoming a literal are
> similar to those that keep it from becoming a builtin: configurable
> contexts are a core part of the decimal module's capabilities, and
> making a builtin type context dependent causes various problems when
> it comes to reasoning about a piece of code based on purely local
> information. Those problems affect human readers regardless, but once
> literals enter the mix, they affect all compile time processing as
> well.

Why do contexts exist? Why isn't this an issue for float, despite
floating point contexts being something that exists in IEEE 754?

As for constant folding - well, maybe python needs a -ffast-math

More information about the Python-ideas mailing list