paraparser.py: minor speedup
authorrgbecker
Wed, 25 Aug 2004 14:38:48 +0000
changeset 2369 f3cc620c14ed
parent 2368 791a362e9cae
child 2370 dcbb4dbad325
paraparser.py: minor speedup
reportlab/platypus/paraparser.py
--- a/reportlab/platypus/paraparser.py	Tue Aug 24 11:36:22 2004 +0000
+++ b/reportlab/platypus/paraparser.py	Wed Aug 25 14:38:48 2004 +0000
@@ -442,11 +442,9 @@
 
     def __getattr__( self, attrName ):
         """This way we can handle <TAG> the same way as <tag> (ignoring case)."""
-        if attrName != attrName.lower() and attrName!="caseSensitive" and not self.caseSensitive:
-            if attrName[:6]=="start_":
-                return eval ("self."+attrName.lower())
-            if attrName[:4]=="end_":
-                return eval ("self."+attrName.lower())
+        if attrName!=attrName.lower() and attrName!="caseSensitive" and not self.caseSensitive and \
+            (attrName.startswith("start_") or attrName.startswith("end_")):
+                return getattr(self,attrName.lower())
         raise AttributeError, attrName
 
     #### bold