
July 18, 2009
7:15 p.m.
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?
In English, "append" means "add at the end", which doesn't make sense for an unordered collection. On the other hand, "add" doesn't imply anything about ordering, so using it for lists would make the intent less clear. -- Greg