[Checkins] SVN: five.pt/trunk/ Remove dictionary optimization (for now). It is somehow incompatible.

Malthe Borch mborch at gmail.com
Fri Jul 22 18:11:05 EDT 2011


Log message for revision 122322:
  Remove dictionary optimization (for now). It is somehow incompatible.

Changed:
  U   five.pt/trunk/CHANGES.txt
  U   five.pt/trunk/src/five/pt/expressions.py

-=-
Modified: five.pt/trunk/CHANGES.txt
===================================================================
--- five.pt/trunk/CHANGES.txt	2011-07-22 22:10:20 UTC (rev 122321)
+++ five.pt/trunk/CHANGES.txt	2011-07-22 22:11:05 UTC (rev 122322)
@@ -3,6 +3,10 @@
 
 In next release ...
 
+- Fixed issue with traversal and dictionary optimization (the
+  optimization has been removed).
+  [malthe]
+
 - Fixed compatibility issue with the ``UnauthorizedBinding`` class and
   traversal.
   [malthe]

Modified: five.pt/trunk/src/five/pt/expressions.py
===================================================================
--- five.pt/trunk/src/five/pt/expressions.py	2011-07-22 22:10:20 UTC (rev 122321)
+++ five.pt/trunk/src/five/pt/expressions.py	2011-07-22 22:11:05 UTC (rev 122322)
@@ -102,10 +102,7 @@
                 name = path_items[i]
                 i += 1
 
-                # special-case dicts for performance reasons
-                if isinstance(base, dict):
-                    base = base[name]
-                elif ITraversable.providedBy(base):
+                if ITraversable.providedBy(base):
                     traverser = getattr(base, method)
                     base = traverser(name)
                 else:



More information about the checkins mailing list