Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1064)

Unified Diff: python/book_base.py

Issue 553420043: Switch to Python 3.x (Closed)
Patch Set: Remove coverage.py Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « python/auxiliar/postprocess_html.py ('k') | python/book_snippets.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: python/book_base.py
diff --git a/python/book_base.py b/python/book_base.py
index 1d0d9eca990407f3671a03c54af143515eef295e..f9b56c5418bbb25a3f0fbc9bf838f96d3145b4e4 100644
--- a/python/book_base.py
+++ b/python/book_base.py
@@ -98,10 +98,10 @@ class BookOutputFormat:
def supported_snippet_types (self):
# Sort according to snippet_type_order, unknown keys come last
- keys = self.snippet_res.keys ()
+ keys = list(self.snippet_res.keys ())
# First the entries in snippet_type_order in that order (if present)
# then all entries not in snippet_type_order in given order
- res = filter (lambda x:x in keys, snippet_type_order) + filter (lambda x:x not in snippet_type_order, keys)
+ res = [x for x in snippet_type_order if x in keys] + [x for x in keys if x not in snippet_type_order]
return res
def snippet_regexp (self, snippettype):
« no previous file with comments | « python/auxiliar/postprocess_html.py ('k') | python/book_snippets.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b