diff genshi/output.py @ 854:4d9bef447df9 trunk

More work on reducing the size of the diff produced by 2to3.
author cmlenz
date Tue, 10 Nov 2009 22:53:21 +0000
parents f33ecf3c319e
children 869ca3cc2f4c
line wrap: on
line diff
--- a/genshi/output.py
+++ b/genshi/output.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2006-2008 Edgewall Software
+# Copyright (C) 2006-2009 Edgewall Software
 # All rights reserved.
 #
 # This software is licensed as described in the file COPYING, which
@@ -265,7 +265,7 @@
                 if sysid:
                     buf.append(' "%s"')
                 buf.append('>\n')
-                yield Markup(''.join(buf)) % filter(None, data)
+                yield Markup(''.join(buf)) % tuple([p for p in data if p])
                 have_doctype = True
 
             elif kind is START_CDATA:
@@ -381,7 +381,7 @@
                 if sysid:
                     buf.append(' "%s"')
                 buf.append('>\n')
-                yield Markup(''.join(buf)) % filter(None, data)
+                yield Markup(''.join(buf)) % tuple([p for p in data if p])
                 have_doctype = True
 
             elif kind is XML_DECL and not have_decl and not drop_xml_decl:
@@ -518,7 +518,7 @@
                 if sysid:
                     buf.append(' "%s"')
                 buf.append('>\n')
-                yield Markup(''.join(buf)) % filter(None, data)
+                yield Markup(''.join(buf)) % tuple([p for p in data if p])
                 have_doctype = True
 
             elif kind is PI:
Copyright (C) 2012-2017 Edgewall Software