On Tue, Feb 17, 2009 at 10:39 AM, Terry Reedy
Returning True or False depending on whether a mutation was done seems like an innovation.
Not really, all Java containers and STL sets and maps do it.
It is an intriguing idea, but doing so just occasionally would add mental burden. Why now change list.extend()? (False if the extension is empty.) or list.sort() (False if the list is already sorted.) List.append(), of course, would always return True.
The mental burden is not bigger than, say, learning that you append() to a list but you add() to a set. Consistency for consistency's sake is IMHO misguided here; there's only so much you can do by treating all containers uniformly. Unlike sequences, the motivation for sets (and dicts for that matter) comes from real use cases so we shouldn't dismiss this request by an all-or-nothing argument. George