diff --git a/tokenizer.py b/tokenizer.py index dac1199..82d0f99 100644 --- a/tokenizer.py +++ b/tokenizer.py @@ -1,4 +1,3 @@ - # I saved this script as gist because I wrote it a lot of times. # It has support for remembering line numbers and so on what is not used. # It was originally written in C by me and ported to Python. @@ -59,10 +58,7 @@ def process_file(file_path): alinia = 1 words = {} with open(file_path, 'r') as f: - while True: - c = f.read(1) - if not c: - break + while c := f.read(1): pos += 1 valid = True