On Mon, Jun 1, 2015 at 1:18 PM, <random...@fastmail.us> wrote: > On Fri, May 29, 2015, at 13:08, Chris Angelico wrote: >> Also, I like talking about Fraction and >> Decimal for the simple reason that they're unobvious; you can poke >> around with Python and discover int and float, and if ever you need >> imaginary/complex numbers, you'll quickly come across complex, but you >> might use Python for years and not realize that decimal.Decimal even >> exists - nor when you'd want it. > > Well, isn't that just a byproduct of what problem space you work in? If > someone _does_ know they need a rational or decimal type (e.g. someone > working with money who's clueful enough to know floats won't do), > they'll find these types relatively quickly from a google search - > there's no glut of third-party implementations, and neither is so > obscure nor easily written from scratch that people wouldn't search for > an existing implementation.
Yes, but how many people actually know they need a rational type? Just now there's a thread on python-ideas that was based around the expectation that a float could do that, which it can't; the OP just naturally assumed that float was the data type he should be using. ChrisA -- https://mail.python.org/mailman/listinfo/python-list