天天看点

Pycharm类名提示:CamelCase convention,checks the PEP8naming conventions(类名应遵守驼峰命名规则)

有些人定义类名的时候,类名的下方会出现一条下滑线

Pycharm类名提示:CamelCase convention,checks the PEP8naming conventions(类名应遵守驼峰命名规则)

提示:

Class names should use CamelCase convention

Inspection info:This inspection checks the PEP8naming conventions

为什么?

从命名规范来说,就是类名最好需要遵守驼峰命名法则比如TelPhone,单词的首字母大写的方法。

Pycharm类名提示:CamelCase convention,checks the PEP8naming conventions(类名应遵守驼峰命名规则)

正确定义类名就不会出现报错。

继续阅读