Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r76633:dd7e1a7a1009
Date: 2015-03-30 12:59 +0200
http://bitbucket.org/pypy/pypy/changeset/dd7e1a7a1009/

Log:    no list->tuple conversion in rpython

diff --git a/rpython/doc/rpython.rst b/rpython/doc/rpython.rst
--- a/rpython/doc/rpython.rst
+++ b/rpython/doc/rpython.rst
@@ -92,6 +92,11 @@
   no variable-length tuples; use them to store or return pairs or n-tuples of
   values. Each combination of types for elements and length constitute
   a separate and not mixable type.
+  
+  There is no general way to convert a list into a tuple, because the
+  length of the result would not be known statically.  (You can of course
+  do ``t = (lst[0], lst[1], lst[2])`` if you know that ``lst`` has got 3
+  items.)
 
 **lists**
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to