Diez B. Roggisch wrote:
> kj schrieb:
>>   lol = [[] for _ in xrange(500)]
> 
> If you call that hideous, I suggest you perform the same exercise in
> Java or C++ - and then come back to python and relax....

I might be missing something that's not explicitly mentioned here, but I'd 
say that all non-associative containers in C++ have a resize() method, some 
even taking an initial size in their constructor.

That said, [[]]*500 is IMHO more readable.

Uli

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to