In <[EMAIL PROTECTED]>, half.italian wrote: > [entries.__setitem__(int(d.date.strftime('%m'))], d.id) for d in > links] > > btw...I was curious of this too. I used 'dir(dict)' and looked for a > method that might do what we wanted and bingo!
This is really ugly. Except `__init__()` it's always a code smell if you call a "magic" method directly instead of using the corresponding syntactic sugar or built in function. And using a list comprehension just for side effects is misleading because the reader expects a (useful) list to be build when stumbling over a list comp and it's wasteful because an unnecessary list of `None`\s is build and thrown away for no reason other than to have a one liner. This is not Perl! ;-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list