forked from SilverStudioGames/WTS
Hasten istype
This commit is contained in:
parent
01126edc4e
commit
247433b573
@ -186,9 +186,9 @@ init python early:
|
||||
return s1.replace(filter, "") == s2.replace(filter, "")
|
||||
|
||||
def istype(inst, clss):
|
||||
if not isinstance(clss, (list, tuple, set)):
|
||||
clss = (clss,)
|
||||
return type(inst) in clss
|
||||
if isinstance(clss, (list, tuple, set)):
|
||||
return type(inst) in clss
|
||||
return type(inst) is clss
|
||||
|
||||
class IntLike(python_object):
|
||||
# Does not support rollback
|
||||
|
Loading…
Reference in New Issue
Block a user