
Nov. 22, 2017
10:02 p.m.
Chris Angelico wrote:
Yeah but if it's wrapping an existing list, it's not really constructing a new object.
That depends on what you consider the object to be. There are existing examples of objects that wrap other objects and mutate them, e.g. TextIOWrapper. If it would make anyone happier, there could be two classes, Heap and HeapWrapper (with one probably being implemented as a subclass of the other). -- Greg