1. Pypy
  2. Untitled project
  3. pypy


Greg Price  committed dd3c75d

Cut out complex interpretation of signature types

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

  • Participants
  • Parent commits 668eb51
  • Branches signatures

Comments (0)

Files changed (1)

File pypy/annotation/signature.py

View file
 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"
 def enforce_signature_return(funcdesc, sigtype, inferredtype):
-    annsigtype = annotation(sigtype, bookkeeper=funcdesc.bookkeeper)
-    return annsigtype
+    return sigtype