[docs] Python 2.7.2

Zachary Ware zachary.ware+pydocs at gmail.com
Sun Nov 18 18:00:49 CET 2012

On Tue, Nov 13, 2012 at 3:05 PM,  <gurleym at gmail.com> wrote:
> Greetings,
> I'm using Python 2.7.2 on windows 7.  From the tutorial page chapter 3.1.1,we start going into numbers and comments. In following the examples I type the code
> 8/5 # Fractions aren't lost when dividing integers <hit enter>
> 1
> Per the example on the web page I should get 1.6 not 1
> Am I doing something wrong?
> Also I purchased your app for iPad. I can't figure out where to do these tutorials on it. I understand the reference page and found the links but where/ how do I input the code in the app. Even just the simple math part.
> Thank you for your time
> -Matt

Hi Matt,

It would appear you're using the Python 3 tutorial with Python 2.7.
You can change the version of the page you're looking at with the
version switching dropdown at the top left of the page; or by changing
'3' to '2' in the address bar.

You've encountered one of the significant backward-incompatible
changes between Python 2 and Python 3; in 2.x the '/' operator is for
floor division while in 3.x '/' is for 'true' division and '//' is for
floor division.  You can enable this functionality in 2.7 by doing
"from __future__ import division", though.

As far as the iPad app, please contact its developer for questions.
It is not maintained by the Python Software Foundation or CPython

More information about the docs mailing list