[Zope-Checkins] CVS: Packages/StructuredText -
DocBookClass.py:1.6.132.1 HTMLClass.py:1.22.130.1
HTMLWithImages.py:1.10.68.1.2.1
Tres Seaver
tseaver at palladion.com
Sat May 28 20:42:17 EDT 2005
Update of /cvs-repository/Packages/StructuredText
In directory cvs.zope.org:/tmp/cvs-serv32028/lib/python/StructuredText
Modified Files:
Tag: tseaver-hasattr_geddon-branch
DocBookClass.py HTMLClass.py HTMLWithImages.py
Log Message:
- Removed all uses of the 'hasattr' builtin from the core, where
the object being tested derives (or might) from Persistent.
XXX: currently, this branch imports a 'safe_hasattr' from ZODB.utils,
which adds a dependency on ZODB for some packages; we probably
need a better location, and perhas a C implementation?
=== Packages/StructuredText/DocBookClass.py 1.6 => 1.6.132.1 ===
--- Packages/StructuredText/DocBookClass.py:1.6 Wed Aug 14 17:58:22 2002
+++ Packages/StructuredText/DocBookClass.py Sat May 28 20:41:36 2005
@@ -213,7 +213,8 @@
def image(self, doc, level, output):
if hasattr(doc, 'key'):
- output('<figure id="%s"><title>%s</title>\n' % (doc.key, doc.getNodeValue()) )
+ output('<figure id="%s"><title>%s</title>\n'
+ % (doc.key, doc.getNodeValue()) )
else:
output('<figure><title>%s</title>\n' % doc.getNodeValue())
## for c in doc.getChildNodes():
=== Packages/StructuredText/HTMLClass.py 1.22 => 1.22.130.1 ===
--- Packages/StructuredText/HTMLClass.py:1.22 Wed Aug 14 17:58:22 2002
+++ Packages/StructuredText/HTMLClass.py Sat May 28 20:41:36 2005
@@ -219,15 +219,17 @@
output("<tr>\n")
for column in row.getColumns()[0]:
if hasattr(column,"getAlign"):
- str = '<%s colspan="%s" align="%s" valign="%s">' % (column.getType(),
- column.getSpan(),
- column.getAlign(),
- column.getValign())
+ str = ('<%s colspan="%s" align="%s" valign="%s">'
+ % (column.getType(),
+ column.getSpan(),
+ column.getAlign(),
+ column.getValign()))
else:
str = '<td colspan="%s">' % column.getSpan()
output(str)
for c in column.getChildNodes():
- getattr(self, self.element_types[c.getNodeName()])(c, level, output)
+ getattr(self, self.element_types[c.getNodeName()]
+ )(c, level, output)
if hasattr(column,"getType"):
output("</"+column.getType()+">\n")
else:
=== Packages/StructuredText/HTMLWithImages.py 1.10.68.1 => 1.10.68.1.2.1 ===
--- Packages/StructuredText/HTMLWithImages.py:1.10.68.1 Sat Apr 9 04:50:53 2005
+++ Packages/StructuredText/HTMLWithImages.py Sat May 28 20:41:36 2005
@@ -26,4 +26,5 @@
output('<a name="%s"></a>\n' % doc.key)
output('<img src="%s" alt="%s">\n' % (doc.href, doc.getNodeValue()))
if doc.getNodeValue() and hasattr(doc, 'key'):
- output('<p><b>Figure %s</b> %s</p>\n' % (doc.key, doc.getNodeValue()))
+ output('<p><b>Figure %s</b> %s</p>\n'
+ % (doc.key, doc.getNodeValue()))
More information about the Zope-Checkins
mailing list