Sets in Python

Magnus Lie Hetland mlh at idi.ntnu.no
Wed Jan 31 19:56:59 EST 2001


"Tim Peters" <tim.one at home.com> wrote in message
news:mailman.980905187.10012.python-list at python.org...
[...]
> Note Greg Wilson's PEP for adding a set type to Python:

Nice!

Any chance that this may be included some time in the future?

And as regards "... in dict"; It would perhaps be more natural
to see a dict as a set of pairs, so that the dictionary would
act similarly to dict.items()?

I.e. "(key, val) in dict" would be the same as
"(key, val) in dict.items()" except that it would take O(1)
time...?

Oh, well... If we get a set type I guess that isn't necessary.

(And I would *love* to have a set type. :-)))

--

  Magnus Lie Hetland      (magnus at hetland dot org)

 "Reality is what refuses to disappear when you stop
  believing in it"                 -- Philip K. Dick






More information about the Python-list mailing list