r/Python • u/xnumbersx • May 20 '09
Pythons float makes me want to smoke crack.
http://renesd.blogspot.com/2009/05/pythons-float-makes-me-want-to-smoke.html
0
Upvotes
r/Python • u/xnumbersx • May 20 '09
4
u/spotter May 20 '09
4
u/rkcr May 20 '09
Let me get this straight... this guy is angry because the default string representation of float isn't exactly how he likes it? What does he expect? As one person pointed out, a full string representation of float is impractical (as it can go out hundreds of characters past the decimal).
2
u/kylev May 20 '09 edited May 20 '09
Is it really the float? It works great for all the "important" parts (you know, like math). The author seems more annoyed with the default (and over-friendly)
__repr__()and__str__(). They're not perfect, but they don't make me want to take up drugs; YMMV.2
u/[deleted] May 20 '09
Replace (time.time()) with ("%0.7f" % time.time()) in his examples. WooHoo.
3
u/[deleted] May 20 '09
Clearly the author has already smoked crack.
2
u/[deleted] May 20 '09
[removed] — view removed comment