-
Kenneth Graunke authored
list[:0] = [item] is a strange way to add an item to a list. 1. It forces the list to be copied, which can be inefficient. 2. It produces a strange ordering: >>> x = [1, 2, 3] >>> x[:0] = [4] >>> x [4, 1, 2, 3] ...whereas list.append(item) produces [1, 2, 3, 4]. 3. Most importantly, list.append is easier to understand at a glance. Reported-by: Paul Berry <stereotype441@gmail.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
f5331613