泷泷_ 2021-12-29 13:20 采纳率: 0%
浏览 6676

multiple exception types must be parenthesized问题如何解决

问题遇到的现象和发生背景 python
问题相关代码,请勿粘贴截图
                    except Exception,e:
                        print ('simi except',e)
                    if len(dic)>20:
                        logout(dic)
                        dic.clear()
运行结果及报错内容

img

我的解答思路和尝试过的方法
我想要达到的结果
  • 写回答

2条回答 默认 最新

  • 关注

    不清楚你的python版本是啥,2.*的使用逗号,3.*的使用as,代码示例如下

                        except Exception as e:
                            print ('simi except',e)
                        if len(dic)>20:
                            logout(dic)
                            dic.clear()
    
    评论

报告相同问题?

问题事件

  • 创建了问题 12月29日