Why do I get a warning when concatenating lists of mixed types in Pycharm?

后端 未结 2 994
慢半拍i
慢半拍i 2020-12-19 13:39

In Pycharm, the following code produces a warning:

from typing import List

list1: List[int] = [1, 2, 3]
list2: List[s         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 13:44

    Like Pycharm says it's just a warning you are allowed to concatenate different objects or lists but it is considered to be a bad practice.

提交回复
热议问题