why () is () and [] is [] work in other way?

Robert Kern robert.kern at gmail.com
Sat Apr 21 17:54:26 EDT 2012


On 4/21/12 10:15 PM, Bernd Nawothnig wrote:

> Your argument above was: it would violate first principles. And I still don't
> see that point. The comparison [] is [] maybe totally useless, of course, but
> which first principle would be violated by a compiler that lets that
> expression evaluate to True?
>
> Where can I read that the result *must* be False?

http://docs.python.org/reference/expressions.html#list-displays

"A list display yields a new list object."

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list