Author: Armin Rigo <[email protected]>
Branch:
Changeset: r89177:a07c1410d491
Date: 2016-12-19 11:22 +0100
http://bitbucket.org/pypy/pypy/changeset/a07c1410d491/
Log: The first half of the changes to weakref.py are finally fixed in
CPython too (issue #19542, will be in 2.7.14). Adapt the code to be
identical.
diff --git a/lib-python/2.7/weakref.py b/lib-python/2.7/weakref.py
--- a/lib-python/2.7/weakref.py
+++ b/lib-python/2.7/weakref.py
@@ -213,10 +213,10 @@
if o is None:
if args:
return args[0]
- raise KeyError, key
+ else:
+ raise KeyError, key
else:
return o
- # The logic above was fixed in PyPy
def setdefault(self, key, default=None):
try:
@@ -230,7 +230,6 @@
return default
else:
return o
- # The logic above was fixed in PyPy
def update(*args, **kwargs):
if not args:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit