On 14/01/2021 17:44, Denys Contant wrote:
I don't understand why sqrt is not a built-in function.
Why do we have to first import the function from the math module?
I use it ALL THE TIME!
I agree that, especially if you have experience in other languages, this feels odd, and I have some sympathy for you.  I am not sure that I can give you a 100% satisfactory answer.
But:
    if the math module should be automatically imported, how many other modules that _somebody_ uses "all the time" should also be automatically be imported?  Python gives you a light-weight framework (fast to load a program) with the option to plug in whichever batteries you need, and it's not so terrible to remember to write "import math" or similar, especially after the first time.

That felt good. Thank you.
Although I hope you have other ways of venting your frustration than shouting at newsgroups.  Perhaps juggling balls?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to