[Python-checkins] peps (merge default -> default): Merge

armin.ronacher python-checkins at python.org
Wed Feb 29 01:59:44 CET 2012


http://hg.python.org/peps/rev/61cc962742be
changeset:   4097:61cc962742be
parent:      4096:34b15c939876
parent:      4095:f10e37d9ba49
user:        Armin Ronacher <armin.ronacher at active-4.com>
date:        Wed Feb 29 00:59:44 2012 +0000
summary:
  Merge

files:
  pep-0409.txt |  11 ++++++++---
  pep-0412.txt |  19 +++++++++++++++++++
  2 files changed, 27 insertions(+), 3 deletions(-)


diff --git a/pep-0409.txt b/pep-0409.txt
--- a/pep-0409.txt
+++ b/pep-0409.txt
@@ -153,12 +153,17 @@
 
 In both of the latter cases the exception chain will stop being followed.
 
-Because the default value for ``__cause__`` is now ``Ellipsis``::
+Because the default value for ``__cause__`` is now ``Ellipsis`` and ``raise
+Exception from Cause`` is simply syntactic sugar for::
+
+    _exc = NewException()
+    _exc.__cause__ = Cause()
+    raise _exc
+
+``Ellipsis``, as well as ``None``, is now allowed as a cause::
 
     raise Exception from Ellipsis
 
-is allowed and will (re)set ``__cause__`` to ``Ellipsis``.
-
 
 Patches
 =======
diff --git a/pep-0412.txt b/pep-0412.txt
--- a/pep-0412.txt
+++ b/pep-0412.txt
@@ -149,6 +149,25 @@
 The iteration order of dictionaries was never defined and has always been
 arbitrary; it is different for Jython and PyPy.
 
+Alternative Implementation
+--------------------------
+
+An alternative implementation for split tables, which could save even more
+memory, is to store an index in the value field of the keys table (instead
+of ignoring the value field). This index would explicitly state where in the
+value array to look. The value array would then only require 1 field for each
+usable slot in the key table, rather than each slot in the key table.
+
+This "indexed" version would reduce the size of value array by about
+one third. The keys table would need an extra "values_size" field, increasing
+the size of combined dicts by one word.
+The extra indirection adds more complexity to the code, potentially reducing
+performance a little.
+
+The "indexed" version will not be included in this implementation,
+but should be considered deferred rather than rejected,
+pending further experimentation.
+
 References
 ==========
 

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list