On Thursday, June 23, 2016 at 9:11:05 PM UTC+12, Marko Rauhamaa wrote:
> Lawrence D’Oliveiro:
> 
>> On Thursday, June 23, 2016 at 8:17:02 PM UTC+12, Marko Rauhamaa wrote:
>>>     if len(leftover) > 0:    # no, I'd never write this
>>>         ...
>>
>> I regularly write “len(leftover) != 0”. Why not?
> 
> The __len__ method is not guaranteed to execute in O(1).

So what is?
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to