Chris Angelico <ros...@gmail.com>:

> On Thu, Nov 13, 2014 at 10:23 AM, Marko Rauhamaa <ma...@pacujo.net> wrote:
>> However, the programmer could have played this frustration out already
>> in his head and written:
>>
>>      assert len(choices) > 0
>>      count = next_size / len(choices)
>
> assert choices
> count = next_size / len(choices)
>
> Or even just:
>
> count = next_size / len(choices) # choices won't be empty

Precisely.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to