str smarter than round?
tim.one at home.com
Fri Jun 15 19:53:48 CEST 2001
> What does str() know that round() doesnt in the following lines?
> >>> a = 1.69
> >>> round(a,2)
> >>> round(a,1)
> >>> str(a)
> How does str manage to get the accurate representation of floating
> points? I am using Windows 2000, Python 2.0
Congratulations! You've elected yourself to be a guinea pig for reading
this new Tutorial Appendix:
never-ask-a-question-unless-you-really-want-an-answer<wink>-ly y'rs - tim
More information about the Python-list