File tree 2 files changed +3
-13
lines changed
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:
10
10
)
11
11
12
12
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
-
23
13
def readwords_stdin () -> Generator [str ]:
24
- for line in readlines_stdin () :
14
+ for line in sys . stdin :
25
15
yield from line .split ()
26
16
27
17
28
18
def readwords_stdin_raw () -> Generator [bytes ]:
29
- for line in readlines_stdin_raw () :
19
+ for line in sys . stdin . buffer :
30
20
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:
151
151
152
152
for name in args or ["-" ]:
153
153
if name == "-" :
154
- streams .append (core . readlines_stdin_raw () )
154
+ streams .append (sys . stdin . buffer )
155
155
else :
156
156
try :
157
157
# pylint: disable=consider-using-with
You can’t perform that action at this time.
0 commit comments