[pyar] Diferencias en versiones de Python
Claudio Freire
klaussfreire en gmail.com
Lun Dic 6 18:38:20 ART 2010
2010/12/6 Sebastian Bassi <sebastian.bassi en globant.com>
> He notado diferencias importantes en el manejo de los numeros
> decimales en distintas versiones de Python.
> Agradeceria si me pueden pasar el resultado de estas operaciones en
> distintas versiones de Python asi veo en donde cambia.
>
Con lo que tengo a mano.
Debian squeeze
Python 3.1.3rc1 (r313rc1:86453, Nov 14 2010, 05:02:14)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> round(2.932224,2)
2.93
>>> 10/3
3.3333333333333335
>>>
Python 2.6.6 (r266:84292, Oct 9 2010, 12:24:52)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> round(2.932224,2)
2.9300000000000002
>>> 10/3
3
>>>
Python 2.6.1 (r261:67515, Dec 15 2009, 21:03:56)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> round(2.932224,2)
2.9300000000000002
>>> 10/3
3
>>>
Python 2.5.5 (r255:77872, Oct 17 2010, 13:42:47)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> round(2.932224,2)
2.9300000000000002
>>> 10/3
3
>>>
CentOS 5.5
Python 2.4.3 (#1, Nov 11 2010, 13:30:19)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> round(2.932224,2)
2.9300000000000002
>>> 10/3
3
>>>
Python 2.6.5 (r265:79063, Jul 8 2010, 12:45:18)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> round(2.932224,2)
2.9300000000000002
>>> 10/3
3
>>>
Python 2.7 (r27:82500, Jul 8 2010, 14:59:49)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> round(2.932224,2)
2.93
>>> 10/3
3
>>>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20101206/2e9949b2/attachment.html>
More information about the pyar
mailing list