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

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,742
Latest member
AshliMayer

Latest Threads

Top