这是我的以下程序
try:
class __Euler3__:
n = 600851475143
primeFactors = []
for i in range(2,n):
if (n%i ==0):
primeFactors.append(i)
n = n/i
i = i -1 #reset i
print primeFactors
except OverflowError as e:
print "the error is" , e
但由于某种原因,Overflowerror 机制无法捕获此异常,我使用的是 python 2.7