From 7622a9d799626bc36aceea2c3b35867937f79ad7 Mon Sep 17 00:00:00 2001 From: Nayuki Minase Date: Thu, 21 Apr 2016 02:19:50 +0000 Subject: [PATCH] Fixed field reference errors in Python code. --- python/qrcodegen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/qrcodegen.py b/python/qrcodegen.py index 7fbdde9..97d5c35 100644 --- a/python/qrcodegen.py +++ b/python/qrcodegen.py @@ -235,8 +235,8 @@ class QrCode(object): if border < 0: raise ValueError("Border must be non-negative") parts = [] - for y in range(-border, self.size + border): - for x in range(-border, self.size + border): + for y in range(-border, self._size + border): + for x in range(-border, self._size + border): if self.get_module(x, y) == 1: parts.append("M{},{}h1v1h-1z".format(x + border, y + border)) return """ @@ -245,7 +245,7 @@ class QrCode(object): -""".format(self.size + border * 2, " ".join(parts)) +""".format(self._size + border * 2, " ".join(parts)) # ---- Private helper methods for constructor: Drawing function modules ----