Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed6.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'constructor': 0.07; 'dict': 0.09; 'am,': 0.12; 'def': 0.13; 'enough?': 0.16; 'mapping,': 0.16; 'subject:syntax': 0.16; 'cc:addr:python-list': 0.16; 'mon,': 0.16; 'received:74.125.82.44': 0.16; 'received:mail- ww0-f44.google.com': 0.16; 'this:': 0.16; 'wrote:': 0.18; 'cc:no real name:2**0': 0.20; 'cheers,': 0.20; 'dec': 0.22; 'header:In- Reply-To:1': 0.22; 'cc:2**0': 0.24; 'saying': 0.26; 'message- id:@mail.gmail.com': 0.28; 'order.': 0.29; 'cc:addr:python.org': 0.29; 'seem': 0.30; 'equivalent': 0.31; 'actually': 0.33; 'probably': 0.34; 'rule': 0.34; 'received:74.125.82': 0.35; 'sequence': 0.37; 'but': 0.37; 'received:74.125': 0.37; 'received:google.com': 0.37; 'either': 0.39; '2011': 0.61; 'receive': 0.68; 'dict,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=41x4bDVOW4J8vzZx9Z/4TuLrEx0gyuufmyyUA6U4YNo=; b=THMgDM2m5K+IVL49kcNy6FqDU2LLCp587sMHY+iWDMTendKGMRv17G9hrM4Z5QGbvI ybWsGSV2nqcBiNSRg/jnEOD+pq1AYR0D3WdTqkzMAOpj4gb43h81JveT+uZbQi21CK3j /1XyzhJ/tq4GOnDS/vvRHaEyvab3K8rN1HdN8= MIME-Version: 1.0 In-Reply-To: <5de94e20-314e-4185-ba8f-75e54f87968e@d10g2000vbk.googlegroups.com> References: <4ee554a3$0$11091$c3e8da3@news.astraweb.com> <5de94e20-314e-4185-ba8f-75e54f87968e@d10g2000vbk.googlegroups.com> From: Ian Kelly Date: Mon, 12 Dec 2011 11:09:04 -0700 Subject: Re: Verbose and flexible args and kwargs syntax To: Eelco Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323713377 news.xs4all.nl 6905 [2001:888:2000:d::a6]:50724 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17069 On Mon, Dec 12, 2011 at 5:21 AM, Eelco wrote: > You cannot; only constructors modelling a sequence or a dict, and > only > in that order. Is that rule clear enough? The dict constructor can receive either a sequence or a mapping, so if I write this: def func(a, b, dict(c)): what will I get? Probably I would want the equivalent of: def func(a, b, **c): but you seem to be saying that I would actually get the equivalent of this: def func(a, b, *c): c = dict(c) Cheers, Ian