Ripping mobility from the clutches of telecom
Python 3k
I was just fooling around with the Python 3.0 alpha release. Floating results on integer division:
mike@slice:~$ python
Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 8 / 5
1
>>>
mike@slice:~$ cd src/Python-3.0a1/
mike@slice:~/src/Python-3.0a1$ ./python
Python 3.0a1 (py3k, Sep 1 2007, 19:58:38)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 8 / 5
1.6000000000000001
>>>
Ain’t that nice? It’s the little things that make me smile.
| Print article | This entry was posted by miker on September 1, 2007 at 9:05 pm, and is filed under ThisIsMobility. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

about 3 years ago
I guess you already knew that:
$ python
Python 2.5.1 (r251:54863, Aug 29 2007, 23:48:33)
[GCC 4.2.0 (Gentoo 4.2.0 p1.4)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> from __future__ import division
>>> 8 / 5
1.6000000000000001