testextractmethod8.py
来自「Python Development Environment (Python I」· Python 代码 · 共 43 行
PY
43 行
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 selection starts somewhere before the "while"-node, still have to normalize selected code in order to parse it
'''
<config>
<offset>48</offset>
<selectionLength>36</selectionLength>
<offsetStrategy>0</offsetStrategy>
</config>
'''
##r
class A:
def pepticMethod(self, a):
while (a < 2):
a += 1
return a
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 + =
减小字号Ctrl + -
显示快捷键?