> You can include the following in your program (I often do) if you > want > division to operate the way you expect: > >>>> from __future__ import division >
Or you can do an explicit float conversion inside your function if you don't want the import effect. def f(x,y): returm float(x)/y This issue is discussed in the Simple Sequences topic of my tutor. HTH, -- 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