and [True,True] --> [True, True]?????

Lie Ryan lie.1296 at gmail.com
Fri Apr 24 02:21:22 EDT 2009


Steven D'Aprano wrote:
> On Mon, 20 Apr 2009 15:13:15 -0500, Grant Edwards wrote:
> 
> 
>> I fail to see the difference between "length greater than 0" and "list
>> is not empty".  They are, by definition, the same thing, aren't they?
> 
> For built-in lists, but not necessarily for arbitrary list-like sequences.

I think a list-like sequence that does not emulate this behavior (False 
when empty, True otherwise) should be considered a buggy implementation 
of the list interface.



More information about the Python-list mailing list