src/reportlab/graphics/barcode/usps.py
branchpy33
changeset 3723 99aa837b6703
parent 3721 0c93dd8ff567
child 3966 d3d2b5e09c88
--- a/src/reportlab/graphics/barcode/usps.py	Sun Feb 17 12:13:56 2013 +0000
+++ b/src/reportlab/graphics/barcode/usps.py	Tue Apr 30 14:28:14 2013 +0100
@@ -97,7 +97,7 @@
     lquiet = inch * (15.0/32.0)
     quiet = 0
     def __init__(self, value='', **args):
-        for (k, v) in list(args.items()):
+        for k, v in args.items():
             setattr(self, k, v)
 
         Barcode.__init__(self, value)
@@ -109,7 +109,7 @@
             if c in string.whitespace:
                 continue
             elif c in "abcdABCD":
-                self.validated = self.validated + string.upper(c)
+                self.validated = self.validated + c.upper()
             else:
                 self.valid = 0
 
@@ -162,7 +162,7 @@
     spaceWidth = inch * 0.0275
     def __init__(self, value='', **args):
 
-        for (k, v) in list(args.items()):
+        for k, v in args.items():
             setattr(self, k, v)
 
         Barcode.__init__(self, value)
@@ -193,7 +193,7 @@
         for c in self.validated:
             if c in string.digits:
                 self.encoded = self.encoded + c
-                check = check + string.atoi(c)
+                check = check + int(c)
             elif c == '-':
                 pass
             else: