Skip to content

Commit a2fcfa2

Browse files
authored
Load input lines into a list
1 parent ed60cda commit a2fcfa2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/json/tool.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ def main():
8888
infile = open(options.infile, encoding='utf-8')
8989
try:
9090
if options.json_lines:
91-
objs = tuple(json.loads(line) for line in infile)
91+
lines = infile.readlines()
92+
objs = (json.loads(line) for line in lines)
9293
else:
9394
objs = (json.load(infile),)
9495
finally:

0 commit comments

Comments
 (0)