What is Python's int
?
Sometimes, int
acts like a type:
print type(int)
<type 'type'>
But most often, we think of it as a function:
print int("5")
5
It's a class! When used in its functional form, it acts as a constructor, but otherwise is seen by the interpreter as a class.