[Python-ideas] Proposal for extending the collections module - bags / multisets, ordered sets / unique lists

Mathias Panzenböck grosser.meister.morti at gmx.net
Mon Jul 20 02:32:31 CEST 2009


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



More information about the Python-ideas mailing list