本文介绍了使用Enum Functional API发生意外警告-PyCharm错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用文档8.13.12中提供的Functional API示例。我收到以下警告(使用python 3.6)。该代码确实可以在控制台中运行,但是我宁愿检查代码时也不会发出警告。我究竟做错了什么?我该如何摆脱警告?

Using the Functional API example given in documentation 8.13.12. I get the following Warning (using python 3.6). The code does work in the console but I'd rather not have warnings upon my code inspection. What am I doing wrong? And how can I get rid of the warning?

from enum import Enum
Animal = Enum('Animal', 'ANT BEE CAT DOG')




推荐答案

这篇关于使用Enum Functional API发生意外警告-PyCharm错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 03:56