File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -10,21 +10,11 @@ def perror(*errors: Any) -> None:
1010 )
1111
1212
13- def readlines_stdin () -> Generator [str ]:
14- while line := sys .stdin .readline ():
15- yield line
16-
17-
18- def readlines_stdin_raw () -> Generator [bytes ]:
19- while line := sys .stdin .buffer .readline ():
20- yield line
21-
22-
2313def readwords_stdin () -> Generator [str ]:
24- for line in readlines_stdin () :
14+ for line in sys . stdin :
2515 yield from line .split ()
2616
2717
2818def readwords_stdin_raw () -> Generator [bytes ]:
29- for line in readlines_stdin_raw () :
19+ for line in sys . stdin . buffer :
3020 yield from line .split ()
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ def python_userland_cat(opts, args: list[str]) -> int:
151151
152152 for name in args or ["-" ]:
153153 if name == "-" :
154- streams .append (core . readlines_stdin_raw () )
154+ streams .append (sys . stdin . buffer )
155155 else :
156156 try :
157157 # pylint: disable=consider-using-with
You can’t perform that action at this time.
0 commit comments