Commits

Philip Jenvey  committed 57f83c7 Merge

merge default

  • Participants
  • Parent commits 9e37694, 0efde1c
  • Branches py3k

Comments (0)

Files changed (5)

File pypy/doc/faq.rst

 programmer).
 
 Instead, since 2012, there is work going on on a still very experimental
-Software Transactional Memory (STM) version of PyPy.  This should give
-an alternative PyPy which internally has no GIL, while at the same time
+`Software Transactional Memory`_ (STM) version of PyPy.  This should give
+an alternative PyPy which works without a GIL, while at the same time
 continuing to give the Python programmer the complete illusion of having
-one.  It would in fact push forward *more* GIL-ish behavior, like
-declaring that some sections of the code should run without releasing
-the GIL in the middle (these are called *atomic sections* in STM).
+one.
+
+.. _`Software Transactional Memory`: stm.html
+
+--------------------------------------------------
+Is PyPy more clever than CPython about Tail Calls?
+--------------------------------------------------
+
+No.  PyPy follows the Python language design, including the built-in
+debugger features.  This prevents tail calls, as summarized by Guido
+van Rossum in two__ blog__ posts.  Moreover, neither the JIT nor
+Stackless__ change anything to that.
+
+.. __: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html
+.. __: http://neopythonic.blogspot.com/2009/04/final-words-on-tail-calls.html
+.. __: stackless.html
 
 ------------------------------------------
 How do I write extension modules for PyPy?

File pypy/interpreter/test/test_generator.py

                 yield 5
                 raise    # should raise "no active exception to re-raise"
         gen = f()
-        gen.next()  # --> 5
+        next(gen)  # --> 5
         try:
-            gen.next()
+            next(gen)
         except TypeError:
             pass
 

File rpython/jit/backend/llsupport/test/zrpy_gc_test.py

             return n, x, x0, x1, x2, x3, x4, x5, x6, x7, l, s
 
         def after(n, x, x0, x1, x2, x3, x4, x5, x6, x7, l, s):
-            check(x.x == 1800 * 2 + 1850 * 2 + 200 - 150)
+            check(x.x == 1800 * 2 + 150 * 2 + 200 - 1850)
 
-        return before, f, None
+        return before, f, after
 
     def test_compile_framework_external_exception_handling(self):
         self.run('compile_framework_external_exception_handling')

File rpython/rtyper/normalizecalls.py

             msg.append("the following functions:")
             msg.append("    %s" % ("\n    ".join(pfg), ))
             msg.append("are called with inconsistent numbers of arguments")
+            msg.append("(and/or the argument names are different, which is"
+                       " not supported in this case)")
             if shape1[0] != shape2[0]:
                 msg.append("sometimes with %s arguments, sometimes with %s" % (shape1[0], shape2[0]))
             else:

File rpython/rtyper/test/test_normalizecalls.py

     .+Sub1.fn
     .+Sub2.fn
 are called with inconsistent numbers of arguments
+\(and/or the argument names are different, which is not supported in this case\)
 sometimes with \d arguments, sometimes with \d
 the callers of these functions are:
     .+otherfunc