Skip to content

Commit 6d99b59

Browse files
committed
Modified comments
1 parent 7df6b92 commit 6d99b59

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

ciphers/caesar_cipher.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ def encrypt_file(
9393
the encrypted content to the output file.
9494
"""
9595

96-
# Use the provided alphabet if given; otherwise default to ascii_letters (a-z + A-Z)
96+
# Use the provided alphabet if given;
97+
# otherwise default to ascii_letters (a-z + A-Z)
9798
alpha = alphabet or ascii_letters
9899

99100
# Open input file for reading and output file for writing
100101
with open(input_path) as fin, open(output_path, "w") as fout:
101-
# Read the input file line by line to avoid loading the entire file into memory
102+
# Read the input file line by line to
103+
# avoid loading the entire file into memory
102104
for line in fin:
103105
# Encrypt the current line using the encrypt function
104106
encrypted_line = encrypt(line, key, alpha)
@@ -188,12 +190,14 @@ def decrypt_file(
188190
the decrypted content to the output file.
189191
"""
190192

191-
# Use the provided alphabet if given; otherwise default to ascii_letters (a-z + A-Z)
193+
# Use the provided alphabet if given
194+
# otherwise default to ascii_letters (a-z + A-Z)
192195
alpha = alphabet or ascii_letters
193196

194197
# Open input file for reading and output file for writing
195198
with open(input_path) as fin, open(output_path, "w") as fout:
196-
# Read the input file line by line to avoid loading the entire file into memory
199+
# Read the input file line by line
200+
# to avoid loading the entire file into memory
197201
for line in fin:
198202
# Encrypt the current line using the encrypt function
199203
decrypted_line = decrypt(line, key, alpha)

0 commit comments

Comments
 (0)