Title: [88807] trunk/Source/_javascript_Core
- Revision
- 88807
- Author
- [email protected]
- Date
- 2011-06-14 09:25:04 -0700 (Tue, 14 Jun 2011)
Log Message
2011-06-14 Benjamin Poulain <[email protected]>
Reviewed by Eric Seidel.
KeywordLookupGenerator's Trie does not work with Python 3
https://bugs.webkit.org/show_bug.cgi?id=62635
With Python 3, dict.items() return an iterator. Since the iterator
protocol changed between Python 2 and 3, the easiest way to get the
values is to have something that use the iterator implicitely, like a
for() loop.
* KeywordLookupGenerator.py:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (88806 => 88807)
--- trunk/Source/_javascript_Core/ChangeLog 2011-06-14 15:56:25 UTC (rev 88806)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-06-14 16:25:04 UTC (rev 88807)
@@ -1,3 +1,17 @@
+2011-06-14 Benjamin Poulain <[email protected]>
+
+ Reviewed by Eric Seidel.
+
+ KeywordLookupGenerator's Trie does not work with Python 3
+ https://bugs.webkit.org/show_bug.cgi?id=62635
+
+ With Python 3, dict.items() return an iterator. Since the iterator
+ protocol changed between Python 2 and 3, the easiest way to get the
+ values is to have something that use the iterator implicitely, like a
+ for() loop.
+
+ * KeywordLookupGenerator.py:
+
2011-06-13 Oliver Hunt <[email protected]>
Reviewed by Gavin Barraclough.
Modified: trunk/Source/_javascript_Core/KeywordLookupGenerator.py (88806 => 88807)
--- trunk/Source/_javascript_Core/KeywordLookupGenerator.py 2011-06-14 15:56:25 UTC (rev 88806)
+++ trunk/Source/_javascript_Core/KeywordLookupGenerator.py 2011-06-14 16:25:04 UTC (rev 88807)
@@ -103,11 +103,12 @@
return self
if len(self.keys) != 1:
return self
- (prefix, suffix) = self.keys.items()[0]
- res = Trie(self.prefix + prefix)
- res.value = suffix.value
- res.keys = suffix.keys
- return res
+ # Python 3: for() loop for compatibility. Use next() when Python 2.6 is the baseline.
+ for (prefix, suffix) in self.keys.items():
+ res = Trie(self.prefix + prefix)
+ res.value = suffix.value
+ res.keys = suffix.keys
+ return res
def fillOut(self, prefix=""):
self.fullPrefix = prefix + self.prefix
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes