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
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to