[Python-Dev] Backport new float repr to Python 2.7? (original) (raw)

Mark Dickinson dickinsm at gmail.com
Sun Oct 11 20:28:11 CEST 2009


In a recent #python-dev IRC conversation, it was suggested that we should consider backporting the new-style float repr from py3k to trunk. I'd like to get people's opinions on this idea.

To recap quickly, the algorithm for computing the repr of floats changed between Python 2.x and Python 3.x (well, actually between 3.0 and 3.1, but 3.0 is dead):

There are (in my view) many benefits to the new approach. Among them:

Possible problems:

I'm mostly neutral on the backport idea: I'm very happy that this is in 3.x, but don't see any great need to backport it. But if there's majority (+BDFL) support, I'm willing to put the work in to do the backport.

Masochists who are still reading by this point and who want more information about the new repr implementation can see the issue discussion:

http://bugs.python.org/issue1580

Thoughts?

Mark



More information about the Python-Dev mailing list