i.e. x = int
I understand that this will make x
an integer if it is not already one, but I'd like to understand the process behind this. In particular, I'd like to know what int
is (as opposed to int()
). I know that int()
is a function, but I'm not sure what int
is. Links to documentation about int
would be helpful since I couldn't find any.
Imagine you had a function called
func
If you then assigned
func
tox
you are assigning the function itself tox
not the result of the callYou're looking at a very similar thing with
int
in this context.