[pypy-svn] r18636 - pypy/dist/pypy/doc

tismer at codespeak.net tismer at codespeak.net
Sat Oct 15 17:14:04 CEST 2005


Author: tismer
Date: Sat Oct 15 17:14:03 2005
New Revision: 18636

Modified:
   pypy/dist/pypy/doc/coding-guide.txt
Log:
small update on list usage rules. Didn't put too much
effort here, please read and blame me!

Modified: pypy/dist/pypy/doc/coding-guide.txt
==============================================================================
--- pypy/dist/pypy/doc/coding-guide.txt	(original)
+++ pypy/dist/pypy/doc/coding-guide.txt	Sat Oct 15 17:14:03 2005
@@ -154,6 +154,18 @@
   operator are allowed and efficient.  
   Repetition via `*` or `*=` is fully supported as well.
 
+  - *indexing*
+    negative indexes are disallowed. Indexes are checked when requested
+    by an IndexError exception clause.
+  
+  - *slicing*
+    the slice start must be within bounds. The stop doesn't need to.
+    Negative indexes are disallowed, except for the [:-1] special case.
+
+  - *insert*
+    the index must be withing bounds (not checked) and must not be negative
+    (checked at compile-time).
+
 **dicts**
 
   dicts with a unique key type only, provided it is hashable. 



More information about the Pypy-commit mailing list