On 2022-04-06 14:28, Chris Angelico wrote:
What do the specialized libraries offer that Decimal doesn't? Is it
really worth all that hassle for the sake of teaching something that,
in production, would just be done with floats and the math module
anyway?

If the decimal module did not already have a global context, would you suggest adding it just in order to support this sort of teaching use-case?

It seems to me that the general claim about global context being a mistake is that it can create pitfalls. In that sense, the global context already is a "hassle" that is imposed on people. I don't see that the potentially-offsetting benefit of (as you say) teaching something that would actually just be done with floats is really that compelling. It's nice, sure, but I also don't see any problem with saying "sorry, you'll have to install a third-party module if you want to teach some mathematical background about how some operations work, because we only put into the stdlib what was necessary to actually do those operations, not teach and demo their underpinnings".


--
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail."
   --author unknown
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/D6Y6JV7WCZ7KBOASHRB74TCR7W2EU4KG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to