del and sets proposal
bearophileHUGS at lycos.com
bearophileHUGS at lycos.com
Fri Oct 3 06:37:03 EDT 2008
More information about the Python-list mailing list
Fri Oct 3 06:37:03 EDT 2008
- Previous message (by thread): del and sets proposal
- Next message (by thread): del and sets proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steven D'Aprano: > Personally, I'd rather see dictionaries grow methods like > symmetric_difference, union, etc. than worry about whether you use del or > remove to remove elements from a set. I have functions for all those operations, so I think they can be useful, but in practice I don't use them often. I think it's a matter of keeping data structures separated in the mind. Another problem is that with those operations you have to find a way to manage values too, are they part of the uniqueness, etc? So there can be different semantics of a single operation, and this may lead to people that have a wrong image model of the purpose of some of those methods. Bye, bearophile
- Previous message (by thread): del and sets proposal
- Next message (by thread): del and sets proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list