Randy Bush wrote:
>... i could be a bit more obscure and do
>       if week in bin:
>          bin[week][not full] += 1
>       else:
>          bin[week] = [ full, not full ]

If you cannot take the setdefault advice, at least do:

     try:
         bin[week][not full] += 1
     except KeyError:
         bin[week] = [full, not full]

--Scott David Daniels
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to