Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #67067
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python.list@tim.thechases.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.019 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'release.': 0.09; 'missed': 0.12; '2.7': 0.14; "'c',": 0.16; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'subject: \n ': 0.16; 'subject:dictionaries': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'replace': 0.24; 'header:In-Reply-To:1': 0.27; 'tim': 0.29; 'getting': 0.31; '3.x': 0.31; 'chase': 0.31; 'quite': 0.32; 'could': 0.34; 'charset:us-ascii': 0.36; 'thanks': 0.36; 'to:addr :python-list': 0.38; 'skip:. 10': 0.39; 'to:addr:python.org': 0.39; 'introduction': 0.68; 'otten': 0.84; 'received:50.22': 0.84 |
| Date | Tue, 25 Feb 2014 16:10:34 -0600 |
| From | Tim Chase <python.list@tim.thechases.com> |
| To | python-list@python.org |
| Subject | Re: intersection, union, difference, symmetric difference for dictionaries |
| In-Reply-To | <lej3ei$hnc$1@ger.gmane.org> |
| References | <G57Pu.24239$Th2.4990@tornado.fastwebnet.it> <CANc-5UwjkYwKJ5cqvu6c1XNG=vBuGimxuueBBFXUyuEbYoVNmw@mail.gmail.com> <20140225150351.063fd961@bigbox.christie.dr> <lej3ei$hnc$1@ger.gmane.org> |
| X-Mailer | Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - boston.accountservergroup.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - tim.thechases.com |
| X-Get-Message-Sender-Via | boston.accountservergroup.com: authenticated_id: tim@thechases.com |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.7372.1393366205.18130.python-list@python.org> (permalink) |
| Lines | 26 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1393366205 news.xs4all.nl 2951 [2001:888:2000:d::a6]:33392 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:67067 |
Show key headers only | View raw
On 2014-02-25 22:54, Peter Otten wrote: > Tim Chase wrote: > > If dicts were to support set ops, > > They do in 2.7 and 3.x. > > >>> a.viewkeys() - b.viewkeys() > set(['a']) > >>> a.viewkeys() & b.viewkeys() > set(['b']) > >>> a.viewkeys() ^ b.viewkeys() > set(['a', 'c']) > >>> a.viewkeys() | b.viewkeys() > set(['a', 'c', 'b']) > > For 3.x replace viewkeys() with keys(). I missed this getting added in the 2.7 release. Thanks for the introduction to .viewkeys()/.keys() as they could prove quite handy. -tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
intersection, union, difference, symmetric difference for dictionaries mauro <mauro@gmail.com> - 2014-02-25 20:32 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Nick Timkovich <prometheus235@gmail.com> - 2014-02-25 14:37 -0600
Re: intersection, union, difference, symmetric difference for dictionaries Skip Montanaro <skip@pobox.com> - 2014-02-25 14:40 -0600
Re: intersection, union, difference, symmetric difference for dictionaries Peter Otten <__peter__@web.de> - 2014-02-25 21:53 +0100
Re: intersection, union, difference, symmetric difference for dictionaries Peter Otten <__peter__@web.de> - 2014-02-25 21:58 +0100
Re: intersection, union, difference, symmetric difference for dictionaries Tim Chase <python.list@tim.thechases.com> - 2014-02-25 15:03 -0600
Re: intersection, union, difference, symmetric difference for dictionaries Duncan Booth <duncan.booth@invalid.invalid> - 2014-02-25 22:21 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Tim Chase <tim@thechases.com> - 2014-02-25 16:35 -0600
Re: intersection, union, difference, symmetric difference for dictionaries Tim Chase <python.list@tim.thechases.com> - 2014-02-25 16:36 -0600
Re: intersection, union, difference, symmetric difference for dictionaries Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-02-25 22:58 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-25 23:10 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Tim Chase <python.list@tim.thechases.com> - 2014-02-25 20:21 -0600
Re: intersection, union, difference, symmetric difference for dictionaries Ben Finney <ben+python@benfinney.id.au> - 2014-02-26 08:27 +1100
Re:intersection, union, difference, symmetric difference for dictionaries Dave Angel <davea@davea.name> - 2014-02-25 16:35 -0500
Re: intersection, union, difference, symmetric difference for dictionaries Peter Otten <__peter__@web.de> - 2014-02-25 22:54 +0100
Re: intersection, union, difference, symmetric difference for dictionaries mauro <mauro@gmail.com> - 2014-02-25 22:02 +0000
Re: intersection, union, difference, symmetric difference for dictionaries mauro <mauro@gmail.com> - 2014-02-25 22:03 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Tim Chase <python.list@tim.thechases.com> - 2014-02-25 16:10 -0600
Re: intersection, union, difference, symmetric difference for dictionaries mauro <mauro@gmail.com> - 2014-02-25 22:11 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-25 22:35 +0000
Re: intersection, union, difference, symmetric difference for dictionaries MRAB <python@mrabarnett.plus.com> - 2014-02-25 23:07 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-26 00:37 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Ben Finney <ben+python@benfinney.id.au> - 2014-02-26 10:14 +1100
Re: intersection, union, difference, symmetric difference for dictionaries MRAB <python@mrabarnett.plus.com> - 2014-02-25 23:25 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Grant Edwards <invalid@invalid.invalid> - 2014-02-25 20:44 +0000
Re: intersection, union, difference, symmetric difference for dictionaries John Gordon <gordon@panix.com> - 2014-02-25 20:44 +0000
Re: intersection, union, difference, symmetric difference for dictionaries Chris Angelico <rosuav@gmail.com> - 2014-03-02 09:29 +1100
csiph-web