summaryrefslogtreecommitdiffstats
path: root/Lib/poly.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-01 19:35:13 (GMT)
committerGuido van Rossum <guido@python.org>1992-01-01 19:35:13 (GMT)
commitbdfcfccbe591e15221f35add01132174c9b4e669 (patch)
tree7e5f0d52b8c44e623b12e8f4b5cd645c361e5aeb /Lib/poly.py
parent4d8e859e8f0a209a7e999ce9cc0988156c795949 (diff)
downloadcpython-bdfcfccbe591e15221f35add01132174c9b4e669.zip
cpython-bdfcfccbe591e15221f35add01132174c9b4e669.tar.gz
cpython-bdfcfccbe591e15221f35add01132174c9b4e669.tar.bz2
New == syntax
Diffstat (limited to 'Lib/poly.py')
-rw-r--r--Lib/poly.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/poly.py b/Lib/poly.py
index abac4c8..3a21904 100644
--- a/Lib/poly.py
+++ b/Lib/poly.py
@@ -39,9 +39,9 @@ def times(a, b):
return res
def power(a, n): # Raise polynomial a to the positive integral power n
- if n = 0: return [1]
- if n = 1: return a
- if n/2*2 = n:
+ if n == 0: return [1]
+ if n == 1: return a
+ if n/2*2 == n:
b = power(a, n/2)
return times(b, b)
return times(power(a, n-1), a)