CSP-J复赛 模拟题4

阅读 20

2024-08-07

问题描述:

在python3.7 版本 运行代码,报错

def retry( ignore_exception_type_info_list:list[IgnoreExceptionInfo]=None):


>>> TypeError: 'type' object is not subscriptable

解决方案:

去掉list内的参数推断,就正常了,似乎是python的一个bug
可以参考文章:https://github.com/krahets/hello-algo/issues/910

def retry( ignore_exception_type_info_list:list=None):

在这里插入图片描述

精彩评论(0)

0 0 举报