[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: use of gettop to change functionality
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Wed, 2 Mar 2011 13:55:10 +0100
On Tue, Mar 1, 2011 at 12:39, steve donovan <firstname.lastname@example.org> 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.