-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
ahhh, the second argument to round. That will do what i want. It was fairly late and i didn't see that argument in the docs. although now i look at it in the light of day its there. neat. I've replaced by divide by 10 stuff with that. now i have different bugs to chase :)
cheers Kim On 31/01/2005, at 9:37 AM, Alan Gauld wrote:
The round function will do what you want though not quite what yousay you want :-)
20.0round(15., -1)
Interesting, I didn't remember the second parameter to round... let alone the fact it could be negative!!
Batteries included once again!
Alan G.
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Kim Branson Diffraction and Theory CSIRO Health Sciences and Nutrition 343 Royal Parade, Parkville Melbourne Ph +613 9662 7136 [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin)
iD8DBQFB/W8Oer2hmGbHcokRAlRwAJkB1NNVnxUN3i2/4bNyKEeiVorDzQCfXGIo JnnkKWdwrIH9XOkB6gFUFAY= =iCJq -----END PGP SIGNATURE-----
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor