I am watching a video on youtube about OOP. I encountered a type of syntax that I could not understand by my past information. The author calls the static method inside the method writing the argument at the beginning of the method's name. The method's function is to detect whether the passed number is an integer or not. The code is below:
class Dog:
@staticmethod
def is_integer(num):
if isinstance(num,float):
return num.is_integer()
elif isinstance(num,int):
return True
else:
return False
My problem is this:
What is the syntax behind num.is_integer()?