Stu*_*mus 8 python refactoring pycharm python-2.7
(环境:PyCharm 5.0.2,interepreter:与OSX 10.10捆绑在一起的Python 2.7)
嘿伙计,
我一直无法弄清楚如何让PyCharm让我在静态方法上做一个Move Refactor.这支持吗?我找不到任何文件表明它不是.
我启动了一个全新的工作区并将其放入文件中.
class MyGreatDemonstratorClass(object):
@staticmethod
def some_static_method():
print "static hey"
@classmethod
def some_class_method(cls):
print "class hey"
def some_instance_method(self):
print "instance hey"
def unbound_method():
print "unbound hey"
Run Code Online (Sandbox Code Playgroud)
some_static_method,将鼠标悬停在"重构"上,单击"移动"some_class_method和some_instance_method,虽然这对我来说很有意义,重构一个绑定的方法是很难的.)unbound_method,它应该工作.