teaching-type-python-oop icon indicating copy to clipboard operation
teaching-type-python-oop copied to clipboard

Stack 샘플 예제 TypeCheck 에러

Open rumbarum opened this issue 3 years ago • 0 comments

  1. pyright 의 경우,
while cur_node.pointer.pointer is not None:
    cur_node = cur_node.pointer  

에서 cur_node를 cur_node. pointer 로 찍을때 point 가 None이 아닌지 명시되지 않아서 에러가 나는 걸로 보이구요.

  1. mypy의 경우 result = cur_node.pointer 로 할당 하면, pointer가 None인지 아닌지 mypy에서 알지 못해서 에러가 나는 걸로 보입니다.

rumbarum avatar Aug 15 '22 09:08 rumbarum