lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Mar 1, 2011 at 12:39, steve donovan <steve.j.donovan@gmail.com> wrote:
It would _not_ be nice if io.lines(nil) would open stdin, since an
accidental nil variable is all too common. Instead, it gives you an
error, as it should.

This relies on the fact that io.lines() defaults on stdin when given no argument. It could have been io.lines(io.stdin), for example.

-- Pierre-Yves