From: "Simon Kröger" Date: 2006-01-29T06:05:57+09:00 Subject: Re: nil != [] Alex Polite wrote: > OK. Here's my second stupid question for today. > > What's the rational behind having 0, [] and "" evaluate to true? "" > and [], I could kind of see. But 0, how on Gods earth can 0 true? > > alex > > -- > Alex Polite > http://flosspick.org - finding the right open source how on earth can -1 be true? No special reason, it's just that way. use zero? if you want to know if it's zero. (What bugs you is the low level knowledge (or better an idea) on how 0 and false would be represented in memory - Qnil is a 4 in ruby :)) cheers Simon btw: i love pythons way in this case