"Steve Willoughby" <[EMAIL PROTECTED]> wrote

> normal division x/y works just as expected, with one caveat: 
> remember
> that if you divide two *integer* values, you will get an *integer*
> division operation yielding an *integer* result.  So:

It's worth pointing out that although beginners tend to find this
behaviour odd it is actually very useful for many types of
programming problem(*). That's why the future mechanism includes
a new operator to do the older style integer division

(*)Some examples include manipulating indices into lists,
selecting from limited ranges, dealing with cyclic lists etc.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to