Author: Armin Rigo <ar...@tunes.org>
Branch: py3.5
Changeset: r90053:f1b0b8f3f631
Date: 2017-02-11 18:25 +0100
http://bitbucket.org/pypy/pypy/changeset/f1b0b8f3f631/

Log:    document more c4cfe1d12253

diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -368,6 +368,12 @@
         return space.newtuple(values_w)
 
     def fget_defaults_count(self, space):
+        # PyPy extension.  This is mostly to make inspect.py happy about
+        # methods like dict.pop(), which take a default but is None.
+        # Previously, inspect.py would build a signature saying that all
+        # arguments are required, and then unittest.mock would complain
+        # if we call it with less arguments.  Now inspect.py looks up
+        # '__defaults_count__' too.
         return space.newint(len(self.defs_w))
 
     def fset_func_defaults(self, space, w_defaults):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to