mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
Added comments in Python and Rust code.
This commit is contained in:
@@ -41,6 +41,8 @@ def do_basic_demo():
|
||||
"""Creates a single QR Code, then prints it to the console."""
|
||||
text = u"Hello, world!" # User-supplied Unicode text
|
||||
errcorlvl = qrcodegen.QrCode.Ecc.LOW # Error correction level
|
||||
|
||||
# Make and print the QR Code symbol
|
||||
qr = qrcodegen.QrCode.encode_text(text, errcorlvl)
|
||||
print_qr(qr)
|
||||
print(qr.to_svg_str(4))
|
||||
|
||||
+1
-1
@@ -790,7 +790,7 @@ class _ReedSolomonGenerator(object):
|
||||
# drop the highest term, and store the rest of the coefficients in order of descending powers.
|
||||
# Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).
|
||||
root = 1
|
||||
for _ in range(degree):
|
||||
for _ in range(degree): # Unused variable i
|
||||
# Multiply the current product by (x - r^i)
|
||||
for j in range(degree):
|
||||
self.coefficients[j] = _ReedSolomonGenerator._multiply(self.coefficients[j], root)
|
||||
|
||||
Reference in New Issue
Block a user