Skip to content

Commit 49a118e

Browse files
author
Josh Watson
committed
Make the return in disassemble_all explicit
Rather than just a `return` statement, `StopIteration` makes it clearer that the generator is done. They're functionally equivalent, but it's better for clarity in my opinion.
1 parent 7da4075 commit 49a118e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyevmasm/evmasm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ def disassemble_all(bytecode, pc=0):
681681
while True:
682682
instr = disassemble_one(bytecode, pc=pc)
683683
if not instr:
684-
return
684+
raise StopIteration
685685
pc += instr.size
686686
yield instr
687687

0 commit comments

Comments
 (0)