]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyx_1_2.py
UserGuide.lyx: fix some typographic issues spotted by Mike
[lyx.git] / lib / lyx2lyx / lyx_1_2.py
index a47fcaf1a018f5ad7646afa0d6872de5edf35b64..19b6647201df02942fba6bbc2e84593521341b26 100644 (file)
@@ -154,7 +154,7 @@ def remove_oldfloat(document):
         j = find_token(lines, "\\end_float", i+1)
 
         floattype = lines[i].split()[1]
-        if not floats.has_key(floattype):
+        if floattype not in floats:
             document.warning("Error! Unknown float type " + floattype)
             floattype = "fig"
 
@@ -284,7 +284,7 @@ def remove_pextra(document):
 
 def is_empty(lines):
     " Are all the lines empty?"
-    return filter(is_nonempty_line, lines) == []
+    return list(filter(is_nonempty_line, lines)) == []
 
 
 move_rexp =  re.compile(r"\\(family|series|shape|size|emph|numeric|bar|noun|end_deeper)")
@@ -358,7 +358,7 @@ def remove_oldert(document):
                     tmp.append(line)
 
             if is_empty(tmp):
-                if filter(lambda x:x != "", tmp) != []:
+                if [x for x in tmp if x != ""] != []:
                     if new == []:
                         # This is not necessary, but we want the output to be
                         # as similar as posible to the lyx format