Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4354364
By: boostpy2005
Hello Fabio,
I do not know how to report a bug.
the following is my test Code snippet.
You will see the row if idx == 5: will be changed to idx==5: after extract
method!
By the way, I can not do refactoring if there exist an error in the module,
so I must comment the Code as you see.
I think that should ba a bug, too, because the other method is independent on
the method, which should be refactored!
During the refactoring, I can not guarantee the other methods are error free.
class Test(object):
def testExtracting(self, idx, xrange):
print "idx: ", idx
if idx > 2:
if idx < 5:
print "idx smaller than 5: x= %s" % idx
elif idx > 8:
print "idx bigger than 5: x= %s" % idx
else:
print "idx bigger than 5, but smaller than 8: x= %s" % idx
else:
print "x musst smaller than 3, x= %s" % idx
idx == 5:
print "nothing!"
for el in xrange(idx):
if el > 4:
print "bigger than 4"
else:
print "smaller than 4"
# def testExtracting_whatIGot(self, idx, xrange):
# print "idx: ", idx
# if idx > 2:
# if idx < 5:
# print "idx smaller than 5: x= %s" % idx
# elif idx > 8:
# print "idx bigger than 5: x= %s" % idx
# else:
# print "idx bigger than 5, but smaller than 8: x= %s" % idx
# else:
# print "x musst smaller than 3, x= %s" % idx
# idx == 5:
# print "nothing!"
#
# for el in xrange(idx):
# if el > 4:
# print "bigger than 4"
# else:
# print "smaller than 4"
#
def TestExtractMethod_Orignal(self):
x = 10
for idx in xrange(x):
print "idx: ", idx
if idx > 2:
if idx < 5:
print "idx smaller than 5: x= %s" % idx
elif idx > 8:
print "idx bigger than 5: x= %s" % idx
else:
print "idx bigger than 5, but smaller than 8: x= %s" % idx
else:
print "x musst smaller than 3, x= %s" % idx
if idx == 5:
print "nothing!"
for el in xrange(idx):
if el > 4:
print "bigger than 4"
else:
print "smaller than 4"
def TestExtractMethod(self):
x = 10
for idx in xrange(x):
self.testExtracting(idx, xrange)
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Pydev-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pydev-users