L
Luis Solís
I have defined a class Myclass
I instanciate the class and I use it in a function, and I could like check
the argument type in the function, but this code don't works
func (xMyclass,..):
if type(xMyclass) is type(Myclass): ...
then I must create a new object of the class and then
if type(xMyclass) is type(Myclass()):
this solution has the problem when Myclass has a complex constructor.
Do you known another solution ?
Thanks in advance
I instanciate the class and I use it in a function, and I could like check
the argument type in the function, but this code don't works
func (xMyclass,..):
if type(xMyclass) is type(Myclass): ...
then I must create a new object of the class and then
if type(xMyclass) is type(Myclass()):
this solution has the problem when Myclass has a complex constructor.
Do you known another solution ?
Thanks in advance