Is math a class or a module?

Hello all,

In the “Object-oriented Programming” mission (step 8, course 2), it is written:

"For example, the math.floor function is really just a class method for the math class. "

But is math really a class? It is at least a module (a collection of functions and classes) but if it were a class, you should be able to instantiate it with bar=math(foo). Am I correct?


Thanks for your help.

math is a package/module. You can only import the package into the script or declare class within math package.

A module is not a class. It has no functions or executable.

Thanks for your prompt reply. This sentence should be fixed by DQ.