src/reportlab/graphics/barcode/code93.py
changeset 3326 ce725978d11c
parent 2964 32352db0d71e
child 3721 0c93dd8ff567
--- a/src/reportlab/graphics/barcode/code93.py	Sat Feb 06 09:24:08 2010 +0000
+++ b/src/reportlab/graphics/barcode/code93.py	Mon Feb 08 18:17:33 2010 +0000
@@ -187,7 +187,7 @@
         for c in self.value:
             if c in string.lowercase:
                 c = string.upper(c)
-            if not _patterns.has_key(c):
+            if c not in _patterns:
                 self.valid = 0
                 continue
             vval = vval + c
@@ -213,7 +213,7 @@
         self.valid = 1
         a = vval.append
         for c in self.value:
-            if not _patterns.has_key(c) and not _extended.has_key(c):
+            if c not in _patterns and c not in _extended:
                 self.valid = 0
                 continue
             a(c)
@@ -223,9 +223,9 @@
     def encode(self):
         self.encoded = ""
         for c in self.validated:
-            if _patterns.has_key(c):
+            if c in _patterns:
                 self.encoded = self.encoded + c
-            elif _extended.has_key(c):
+            elif c in _extended:
                 self.encoded = self.encoded + _extended[c]
             else:
                 raise ValueError