Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3002
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python@mrabarnett.plus.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'suppose': 0.05; 'args': 0.07; 'from:addr:python': 0.09; 'imho.': 0.09; 'overwrite': 0.09; 'subject:()': 0.09; 'am,': 0.14; 'wrote:': 0.14; '(key': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'mrab': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'reply-to:addr:python-list': 0.16; 'such,': 0.16; 'argument': 0.16; 'entries': 0.16; 'subject:] ': 0.16; 'subject:skip:d 10': 0.18; "wouldn't": 0.18; 'tue,': 0.20; 'header:In-Reply-To:1': 0.22; 'optional': 0.23; 'values.': 0.23; 'structure': 0.24; 'received:84': 0.25; "i'm": 0.26; 'chris': 0.27; 'to:addr:python-list': 0.32; 'wanting': 0.33; 'skip:" 10': 0.34; 'header:User-Agent:1': 0.35; 'reply- to:addr:python.org': 0.35; 'should': 0.37; 'apr': 0.38; 'pretty': 0.38; 'larger': 0.39; 'to:addr:python.org': 0.39; 'except': 0.39; 'would': 0.40; 'act': 0.61; '2011': 0.62; 'reply-to:no real name:2**0': 0.72; 'header:Reply-To:1': 0.72; 'subject:Request': 0.73 |
| X-IronPort-Anti-Spam-Filtered | true |
| X-IronPort-Anti-Spam-Result | Aj8HAJuHo03Unw4S/2dsb2JhbACZBI0cd8MNhW4EkUI |
| Date | Mon, 11 Apr 2011 23:59:33 +0100 |
| From | MRAB <python@mrabarnett.plus.com> |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: [Feature Request] dict.setdefault() |
| References | <48897e75-c02c-43c7-9f46-39da4bcc406d@p16g2000vbi.googlegroups.com> <1302560207.11756.1.camel@localhost.localdomain> <4DA38391.1040507@mrabarnett.plus.com> <BANLkTikhS0C05q+349XePW-bn94C97EUYg@mail.gmail.com> |
| In-Reply-To | <BANLkTikhS0C05q+349XePW-bn94C97EUYg@mail.gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| Reply-To | python-list@python.org |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.230.1302562770.9059.python-list@python.org> (permalink) |
| Lines | 13 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1302562770 news.xs4all.nl 81476 [::ffff:82.94.164.166]:38536 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:3002 |
Show key headers only | View raw
On 11/04/2011 23:44, Chris Angelico wrote: > On Tue, Apr 12, 2011 at 8:41 AM, MRAB<python@mrabarnett.plus.com> wrote: >> I'm not sure that "setdefault" should take **kw args for this because >> of its existing argument structure (key + optional value). >> >> A new method like "updatedefault" may be better, IMHO. It would act >> like "update" except that it wouldn't overwrite existing values. > > Wouldn't x.updatedefault(y) be pretty much y.update(x) ? > I suppose it would, except that it wouldn't be in-place as such, and it wouldn't be as efficient if you're wanting to default only a few entries in a larger dict.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
[Feature Request] dict.setdefault() rantingrick <rantingrick@gmail.com> - 2011-04-11 14:35 -0700
Re: [Feature Request] dict.setdefault() Westley Martínez <anikom15@gmail.com> - 2011-04-11 15:16 -0700
Re: [Feature Request] dict.setdefault() MRAB <python@mrabarnett.plus.com> - 2011-04-11 23:41 +0100
Re: dict.setdefault() rantingrick <rantingrick@gmail.com> - 2011-04-11 19:58 -0700
Re: dict.setdefault() Westley Martínez <anikom15@gmail.com> - 2011-04-12 07:02 -0700
Re: [Feature Request] dict.setdefault() Chris Angelico <rosuav@gmail.com> - 2011-04-12 08:44 +1000
Re: dict.setdefault() Raymond Hettinger <python@rcn.com> - 2011-04-11 15:49 -0700
Re: [Feature Request] dict.setdefault() Chris Rebert <clp2@rebertia.com> - 2011-04-11 15:53 -0700
Re: [Feature Request] dict.setdefault() MRAB <python@mrabarnett.plus.com> - 2011-04-11 23:59 +0100
Re: [Feature Request] dict.setdefault() Tim Chase <python.list@tim.thechases.com> - 2011-04-11 18:25 -0500
Re: dict.setdefault() Raymond Hettinger <python@rcn.com> - 2011-04-11 17:17 -0700
csiph-web