Re:Good fun with bad crypto
by tekacs on Thursday January 16, 2014 @06:05PM
(#7073120)
Er... no. No it absolutely wouldn't block until end-of-input.
If list comprehensions were being used to precompute the output and the whole list printed from (what you seem to be thinking of) then perhaps yes, but any of:
for x in sys.stdin:
...
or
[... for x in sys.stdin]
(where ... is print(func(x)) as per the post)
as per the GP post will print response strings as the input comes in.
If list comprehensions were being used to precompute the output and the whole list printed from (what you seem to be thinking of) then perhaps yes, but any of:
or (where ... is print(func(x)) as per the post)as per the GP post will print response strings as the input comes in.