
June 26, 2009
5:36 a.m.
[Steven D'Aprano]
I suggested adding extra functionality to list.__new__, and Nick suggested a new constructor list.from_list(). Nick suggested making from_list destructive, but I don't see the advantage of doing so. I
FWIW, the constructor for list objects already has a fast path for copying an input list or tuple. So the only new thing you can add is a destructive, steal the pointer approach that breaks encapsulation and opens a can of worms. Raymond