The is operator, which performs dynamic type checking, is used to verify the actual runtime class of an object. The expression
object is class
returns True if object is an instance of the class denoted by class or one of its descendants, and False otherwise. (If object is nil, the result is False.) If the declared type of object is unrelated to class what is, if the types are distinct and one is not an ancestor of the other
> if a = 3 then과 if a is 3 then은 같은 것인지..
>
님의 질문은 is라는 연산자에 대해 혼동하는듯 하는군요...
is의 도움을 보면....
The is operator, which performs dynamic type checking, is used to verify the actual runtime class of an object. The expression
object is class
returns True if object is an instance of the class denoted by class or one of its descendants, and False otherwise. (If object is nil, the result is False.) If the declared type of object is unrelated to class what is, if the types are distinct and one is not an ancestor of the other