Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'args,': 0.09; 'dict': 0.09; 'positional': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subclass': 0.09; 'subclasses': 0.09; 'booth:': 0.16; 'irrelevant,': 0.16; 'issue:': 0.16; 'subject:syntax': 0.16; 'language': 0.17; 'suggest': 0.20; 'header :In-Reply-To:1': 0.22; 'keyword': 0.24; 'class': 0.29; 'list': 0.32; "can't": 0.32; 'header:User-Agent:1': 0.33; 'rather': 0.33; 'header:X-Complaints-To:1': 0.33; 'that,': 0.33; 'to:addr:python- list': 0.34; 'but': 0.37; 'another': 0.37; 'skip:_ 10': 0.37; 'received:org': 0.38; 'some': 0.38; 'received:de': 0.39; 'being': 0.39; 'to:addr:python.org': 0.40; 'happens': 0.40 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Christian Heimes Subject: Re: Verbose and flexible args and kwargs syntax Date: Sun, 11 Dec 2011 14:14:13 +0100 References: <4EE48AB3.7070807@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: f048036209.adsl.alicedsl.de User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 In-Reply-To: X-Enigmail-Version: 1.4a1pre OpenPGP: id=AD16AB1B; url=http://cheimes.de/heimes.asc 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323609269 news.xs4all.nl 6941 [2001:888:2000:d::a6]:34658 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16984 Am 11.12.2011 13:39, schrieb Duncan Booth: >> Another issue: You suggest being able to use "attrdict" or some other >> dict subclass. This means that, rather than being a language >> construct, this will involve a name lookup. And what happens if you >> have a class that subclasses both list and dict? Will it get the >> positional args, the keyword args, or both? > > Irrelevant, you can't subclass both list and dict: But you can fake it with __instancecheck__ and __subclasscheck__ methods. Christian