Hacker News new | ask | show | jobs
by crazygringo 247 days ago
> And where do you get these input strings?

From database fields, API calls, JSON values, HTML tag content, function inputs generally, you know -- the normal places.

In my experience, most people aren't dealing directly with files (or streams) most of the time.

1 comments

Your examples ultimately come from files or sockets, as I mentioned. Especially if big enough to use splitlines on them.

I also used the word generally, so your insistence on quantifying the proportion is a complete waste of time.

What a nonsensical thing to say. You said to call "for line in file" -- you can't do that on a string, even if it originally came from part of a file. Or are you suggesting one should...?

And I said your "generally" was wrong. You were provided general advice, I'm saying it's wrong in general. Do you see me giving numerical quantities anywhere?