diff options
| author | Andrew M. Kuchling <amk@amk.ca> | 2008-09-13 01:57:25 (GMT) | 
|---|---|---|
| committer | Andrew M. Kuchling <amk@amk.ca> | 2008-09-13 01:57:25 (GMT) | 
| commit | d9a9c1066c64900a902f5a70b132880e29749ecc (patch) | |
| tree | 3a019489694ff69f0a94003e0eea5952020aeb6c /Demo/scripts/fact.py | |
| parent | 0bef15846fb3a3a0c2c277ee7bc22ace719a47b6 (diff) | |
| download | cpython-d9a9c1066c64900a902f5a70b132880e29749ecc.zip cpython-d9a9c1066c64900a902f5a70b132880e29749ecc.tar.gz cpython-d9a9c1066c64900a902f5a70b132880e29749ecc.tar.bz2  | |
Update uses of string exceptions
Diffstat (limited to 'Demo/scripts/fact.py')
| -rwxr-xr-x | Demo/scripts/fact.py | 4 | 
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  | 
