Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'mrab': 0.05; 'duplicate': 0.07; 'keys,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '*only*': 0.16; 'dictionaries': 0.16; 'finney': 0.16; 'implies': 0.16; 'keys.': 0.16; 'rather,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'statement;': 0.16; 'subject:dictionaries': 0.16; 'wrote:': 0.18; 'header:User- Agent:1': 0.23; 'values': 0.27; 'header:X-Complaints-To:1': 0.27; 'point': 0.28; 'sets': 0.30; "i'm": 0.30; 'values.': 0.31; 'writes:': 0.31; 'yes.': 0.31; 'but': 0.35; 'received:com.au': 0.36; 'science,': 0.36; 'ben': 0.38; 'to:addr:python-list': 0.38; 'explain': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; "you're": 0.61; 'skip:\xe2 10': 0.65; '8bit%:21': 0.69; 'otten': 0.84; 'received:125': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: intersection, union, difference, symmetric difference for dictionaries Date: Wed, 26 Feb 2014 10:14:30 +1100 References: <85fvn6q3ws.fsf@benfinney.id.au> <530D2230.4060807@mrabarnett.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: vmx15867.hosting24.com.au X-Public-Key-ID: 0xBD41714B X-Public-Key-Fingerprint: 9CFE 12B0 791A 4267 887F 520C B7AC 2E51 BD41 714B X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-gpg.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:Z7CI1F3kmWqcDlq2hDwGFGhK2Ss= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393370084 news.xs4all.nl 2954 [2001:888:2000:d::a6]:36450 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67076 MRAB writes: > On 2014-02-25 21:27, Ben Finney wrote: > > Peter Otten <__peter__@web.de> writes: > > > >> mauro wrote: > >> > >> > - Dictionaries and sets are both accessed by key > >> > >> but sets have no values > > > > Or rather, sets *only* have values. Dictionaries have keys, sets do > > not have keys. > > > But a dictionary can have duplicate values, a set cannot. Yes. Your “but” implies you think that contradicts my statement; it doesn't. So I'm not sure what point you're making. -- \ “Alternative explanations are always welcome in science, if | `\ they are better and explain more. Alternative explanations that | _o__) explain nothing are not welcome.” —Victor J. Stenger, 2001-11-05 | Ben Finney