Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46883
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <fabiosantosart@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.032 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'arguments': 0.09; 'constructor': 0.09; 'subject:question': 0.10; 'cc:addr:python- list': 0.11; '>>': 0.16; '>on': 0.16; '>the': 0.16; 'dict': 0.16; 'tuples,': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'of.': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'yes.': 0.31; 'copying': 0.34; 'skip:d 20': 0.34; 'received:209.85': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'keyword': 0.36; 'skip:> 10': 0.36; 'list': 0.37; 'received:209': 0.37; 'being': 0.38; 'feed': 0.38; 'skip:& 20': 0.39; 'bad': 0.39; "you're": 0.61; 'skip:n 10': 0.64; 'dict()': 0.84; 'on?': 0.91; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=22cQ5xWGuGqsTjdJQ3Ccq6Iyo/zeEwTpnpnUNDxuGyU=; b=c5z8og+eBrmqAOFmhBpSKrjExvFYUQwv9Eg+NZg5mccf8/foeaQ6My3Dij+2Ilhvee EswcVhO2oUl8kKH8TTr8Jrwk5cK5fij2umd6UeQx7v+1lW0m+v42Zi2YuMdcTG4/I8FS QDDfc0czG9+2i7zOV6eSPnvo1yJVYZ/Z1012Dsx+l3Y9bY9pLYXIcXP/k3ypF/aPCXRe aJL3Wf7d9ngxJ+TIUu3UNu/0tdq1WY6kx0+CDTjGHByedWenqtV+G/fXRS9bh39a8S4V z/MXtZGfDi0/lowkTKEVPAn5ivrvMKt0pJmVmmiC9ByvmJotC02Wsks5YnNZKpCHwfpP FcNw== |
| MIME-Version | 1.0 |
| X-Received | by 10.229.106.90 with SMTP id w26mr774421qco.138.1370348118800; Tue, 04 Jun 2013 05:15:18 -0700 (PDT) |
| In-Reply-To | <BLU176-W328C47391F61A540801441D79E0@phx.gbl> |
| References | <323f2f5b-1f50-4689-90b8-74c411e43971@googlegroups.com> <vg3hahefhel.fsf@coffee.modeemi.fi> <1ba2ceec-f778-4c95-bf98-260fc48b4c3f@googlegroups.com> <CAPTjJmrM=ai3g2XXSSULYvxdJKhvoTe61PefFC3tc20i5ajhHA@mail.gmail.com> <kokblm$eb0$1@ger.gmane.org> <BLU176-W409F23043AF5028FCB3D50D79E0@phx.gbl> <CAA=1kxQFcMgSJ2_eD00B35V31WpbFiQ6LR=oBzrigg=8QoafCA@mail.gmail.com> <BLU176-W328C47391F61A540801441D79E0@phx.gbl> |
| Date | Tue, 4 Jun 2013 13:15:18 +0100 |
| Subject | RE: Beginner question |
| From | Fábio Santos <fabiosantosart@gmail.com> |
| To | Carlos Nepomuceno <carlosnepomuceno@outlook.com> |
| Content-Type | multipart/alternative; boundary=0023544714c4d7510404de530884 |
| Cc | python-list@python.org |
| 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 | <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.2641.1370348127.3114.python-list@python.org> (permalink) |
| Lines | 52 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1370348127 news.xs4all.nl 15937 [2001:888:2000:d::a6]:44605 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:46883 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On 4 Jun 2013 12:57, "Carlos Nepomuceno" <carlosnepomuceno@outlook.com>
wrote:
>
> >On 4 Jun 2013 12:28, "Carlos Nepomuceno" <carlosnepomuceno@outlook.com>
wrote:
> [...]
>
> >> What's going on? Is there a way to make dict() to resolve the
variables?
> >Well yes.
> >dict(**{a:0,b:1})
> >The dict() constructor makes a dictionary from keyword arguments. So you
just have to feed it keyword arguments using **.
> >And if you're in a bad day,
> >dict(**locals())
>
> That's exactly the same!
> >>>dict(**{a:0,b:1})=={a:0,b:1}
> True
>
> Are there any benefits from using dict() instead of {}?
Other than being able to create a dict from a list of tuples, and copying a
dict using dict(anotherdict.items()), not that I know of.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Beginner question eschneider92@comcast.net - 2013-06-03 20:39 -0700
RE: Beginner question Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 09:46 +0300
Re: Beginner question John Ladasky <john_ladasky@sbcglobal.net> - 2013-06-04 00:53 -0700
RE: Beginner question Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 11:17 +0300
Re: Beginner question Anssi Saari <as@sci.fi> - 2013-06-04 10:45 +0300
Re: Beginner question John Ladasky <john_ladasky@sbcglobal.net> - 2013-06-04 00:57 -0700
Re: Beginner question Chris Angelico <rosuav@gmail.com> - 2013-06-04 18:24 +1000
Re: Beginner question Peter Otten <__peter__@web.de> - 2013-06-04 11:23 +0200
RE: Beginner question Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 14:23 +0300
Re: Beginner question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-04 12:35 +0000
RE: Beginner question Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 15:51 +0300
Re: Beginner question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-07 02:21 +0000
RE: Beginner question Fábio Santos <fabiosantosart@gmail.com> - 2013-06-04 12:34 +0100
RE: Beginner question Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 14:53 +0300
Re: Beginner question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-04 12:25 +0000
RE: Beginner question Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 15:37 +0300
RE: Beginner question Fábio Santos <fabiosantosart@gmail.com> - 2013-06-04 13:47 +0100
RE: Beginner question Fábio Santos <fabiosantosart@gmail.com> - 2013-06-04 13:15 +0100
Re: Beginner question Mitya Sirenef <msirenef@lightbird.net> - 2013-06-04 13:16 -0400
Re: Beginner question Larry Hudson <orgnut@yahoo.com> - 2013-06-04 02:13 -0700
Re: Beginner question Roy Smith <roy@panix.com> - 2013-06-04 09:16 -0400
Re: Beginner question Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-04 20:43 +0100
Re: Beginner question eschneider92@comcast.net - 2013-06-05 20:42 -0700
csiph-web