Ka-Ping Yee wrote:
> On Wed, 23 Mar 2005, Reinhold Birkenfeld wrote:
>> What does you implementation do for this:
>>
>> >>> somevar = False
>> >>> filter(_ and False, numbers)
> 
> It fails.  (For the same reason that __len__ doesn't work --
> Python insists that __nonzero__ must return an int.)  Though
> i must say i have no idea what you are trying to do here.
> If you filter on False, you'll always get an empty list.

I know; I just wanted to show that this approach can be very misleading
as and/or can't be overloaded.

Reinhold


-- 
Mail address is perfectly valid!

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to