summaryrefslogtreecommitdiffstats
path: root/Demo/scripts/fact.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/scripts/fact.py')
-rwxr-xr-xDemo/scripts/fact.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Demo/scripts/fact.py b/Demo/scripts/fact.py
index 6dafa66..c030187 100755
--- a/Demo/scripts/fact.py
+++ b/Demo/scripts/fact.py
@@ -8,10 +8,8 @@
import sys
from math import sqrt
-error = 'fact.error' # exception
-
def fact(n):
- if n < 1: raise error # fact() argument should be >= 1
+ if n < 1: raise ValueError # fact() argument should be >= 1
if n == 1: return [] # special case
res = []
# Treat even factors special, so we can use i = i+2 later