
July 20, 2009
12:32 a.m.
On 07/19/2009 04:14 AM, Steven D'Aprano wrote:
On Sun, 19 Jul 2009 11:44:00 am Mathias Panzenböck wrote:
I always thought it's odd that pythons list has append but the set class has the method add. Whats the reason for that anyway?
You can't append an item to the end of the set, because sets don't have an end. They're unordered.
Yes, but you can add an element to a list. That the position where it is added is the end is under the interface of the super class just coincidence. -panzi