4 # The algorithm is not efficient, but easy to understand.
5 # If there are large factors, it will take forever to find them,
6 # because we try all odd numbers between 3 and sqrt(n)...
12 if n
< 1: raise ValueError # fact() argument should be >= 1
13 if n
== 1: return [] # special case
15 # Treat even factors special, so we can use i = i+2 later
19 # Try odd numbers up to sqrt(n)
20 limit
= sqrt(float(n
+1))
35 for arg
in sys
.argv
[1:]:
46 if __name__
== "__main__":