📄 testextractmethodrename1.py
字号:
class A:
def test(self):
a = 1
while (a < 2):
a += 1
var = a * a
print var
def myMethod(self):
print self.anAttribute
a = A()
a.test()
##c this test will extract a method and rename the variables
'''
<config>
<offset>48</offset>
<selectionLength>36</selectionLength>
<offsetStrategy>0</offsetStrategy>
<renameMap>
<entry>
<string>a</string>
<string>b</string>
</entry>
</renameMap>
</config>
'''
##r
class A:
def pepticMethod(self, b):
while (b < 2):
b += 1
return b
def test(self):
a = 1
a = self.pepticMethod(a)
var = a * a
print var
def myMethod(self):
print self.anAttribute
a = A()
a.test()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -