Author: Greg Price <[email protected]>
Branch: signatures
Changeset: r59319:dd3c75d58df4
Date: 2012-12-02 18:29 -0800
http://bitbucket.org/pypy/pypy/changeset/dd3c75d58df4/

Log:    Cut out complex interpretation of signature types

        This was copied from "enforceargs", but our little DSL will be
        different.

diff --git a/pypy/annotation/signature.py b/pypy/annotation/signature.py
--- a/pypy/annotation/signature.py
+++ b/pypy/annotation/signature.py
@@ -134,9 +134,7 @@
 
 def enforce_signature_args(funcdesc, paramtypes, actualtypes):
     assert len(paramtypes) == len(actualtypes)
-    params_s = []
-    for i, paramtype in enumerate(paramtypes):
-        params_s.append(annotation(paramtype, bookkeeper=funcdesc.bookkeeper))
+    params_s = paramtypes
     for i, (s_param, s_actual) in enumerate(zip(params_s, actualtypes)):
         if not s_param.contains(s_actual):
             raise Exception("%r argument %d:\n"
@@ -146,5 +144,4 @@
 
 
 def enforce_signature_return(funcdesc, sigtype, inferredtype):
-    annsigtype = annotation(sigtype, bookkeeper=funcdesc.bookkeeper)
-    return annsigtype
+    return sigtype
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to