JavaShuo
栏目
标签
PyCharm提示Method may be 'static' more... (Ctrl+F1)
时间 2021-01-17
标签
#python
栏目
Python
繁體版
原文
原文链接
用PyCharm写python代码的时候,碰到下面的问题: 在类里面定义一个方法的时候,出现了Method may be ‘static’ more… (Ctrl+F1)提示,这是IDE告诉我们这是可能一个静态方法,因为eat()这个方法没有设计到类实例属性和实例方法的操作,解决办法是在该静态方法上面加:@staticmethod 顺便复习一下实例方法、类方法、静态方法:
>>阅读原文<<
相关文章
1.
pycharm提示 Method 'xxx' may be 'static'(类方法与静态方法)
2.
PyCharm:method may be static
3.
python Error:Method ‘XXX’ may be ‘static’
4.
Method can be static
5.
pycharm提示Method ‘send_message‘ may be ‘static‘,函数方法设置静态方法,装饰器
6.
webstorm中angular2的方法总是提示method can be static的解决方法
7.
static method
8.
【踩坑】报错 non-static method xxx() cannot be referenced from a static context
9.
Python的method, class method, static method
10.
intellij debug模式提示 Method breakpoints may dramatically slow down debugging
更多相关文章...
•
Eclipse 悬浮提示
-
Eclipse 教程
•
XSL-FO static-content 对象
-
XSL-FO 教程
•
SpringBoot中properties文件不能自动提示解决方法
•
IDEA下SpringBoot工程配置文件没有提示
相关标签/搜索
method
static
提示
提示音
安全提示
提示符
pycharm
method...in
ipv4.method
Python
PHP 7 新特性
Hibernate教程
PHP教程
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
【Java8新特性_尚硅谷】P1_P5
2.
SpringSecurity 基础应用
3.
SlowFast Networks for Video Recognition
4.
074-enable-right-click
5.
WindowFocusListener窗体焦点监听器
6.
DNS部署(二)DNS的解析(正向、反向、双向、邮件解析及域名转换)
7.
Java基础(十九)集合(1)集合中主要接口和实现类
8.
浏览器工作原理学习笔记
9.
chrome浏览器构架学习笔记
10.
eclipse引用sun.misc开头的类
本站公众号
欢迎关注本站公众号,获取更多信息
相关文章
1.
pycharm提示 Method 'xxx' may be 'static'(类方法与静态方法)
2.
PyCharm:method may be static
3.
python Error:Method ‘XXX’ may be ‘static’
4.
Method can be static
5.
pycharm提示Method ‘send_message‘ may be ‘static‘,函数方法设置静态方法,装饰器
6.
webstorm中angular2的方法总是提示method can be static的解决方法
7.
static method
8.
【踩坑】报错 non-static method xxx() cannot be referenced from a static context
9.
Python的method, class method, static method
10.
intellij debug模式提示 Method breakpoints may dramatically slow down debugging
>>更多相关文章<<