Author: Boglarka Vezer <[email protected]>
Branch: py3.3
Changeset: r72491:b8a56b701025
Date: 2014-07-26 11:26 +0200
http://bitbucket.org/pypy/pypy/changeset/b8a56b701025/
Log: fixing typo in range hash function
diff --git a/pypy/module/__builtin__/functional.py
b/pypy/module/__builtin__/functional.py
--- a/pypy/module/__builtin__/functional.py
+++ b/pypy/module/__builtin__/functional.py
@@ -482,7 +482,7 @@
def descr_hash(self, space):
if space.eq_w(self.w_length, space.wrap(0)):
w_tup = space.newtuple([self.w_length, space.w_None, space.w_None])
- elif space.eq_w(self.w_length, space.wrap(0)):
+ elif space.eq_w(self.w_length, space.wrap(1)):
w_tup = space.newtuple([self.w_length, self.w_start, space.w_None])
else:
w_tup = space.newtuple([self.w_length, self.w_start, self.w_step])
diff --git a/pypy/module/__builtin__/test/test_functional.py
b/pypy/module/__builtin__/test/test_functional.py
--- a/pypy/module/__builtin__/test/test_functional.py
+++ b/pypy/module/__builtin__/test/test_functional.py
@@ -484,7 +484,7 @@
for a in test_ranges:
for b in test_ranges:
if a == b:
- assert (hash(a), hash(b))
+ assert hash(a) == hash(b)
# Ranges are unequal to other types (even sequence types)
assert (range(0) == ()) is False
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit