del and sets proposal

L

Lawrence D'Oliveiro

Steven D'Aprano said:
Steven D'Aprano said:
Would it really be "confusing" if sets used the same interface as dicts
use? I don't think so. What else could "del aset[x]" mean other than
"delete element x"?

Yes, but "x" in what sense?

The only sense possible.

There is no precedent for using a set element as a subscript to the set.
 
H

Henk.van.Asselt

"Life was like a box of chocolates. You never know what you're gonna
get."

Regardless of how it is implemented, mathematically a set is a
collection of items.
The order does not matter, an item is part of a set, or is not part of
a set. Period.

Henk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top