Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:not': 0.03; 'subject:code': 0.07; 'arguments': 0.09; 'feature.': 0.09; 'subject:Why': 0.09; 'python': 0.11; 'def': 0.12; '**kwargs):': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:python3': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'versions': 0.24; 'software.': 0.24; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'anyone': 0.31; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'simply': 0.61; 'happen': 0.63; 'jul': 0.74; 'subject:this': 0.83; 'subject::': 0.85; '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 :content-type; bh=6B/24mibTMBDu37cLkX7Jc8wdD6yJVFTiYtM+EsxttM=; b=uMEeHwYM0Bc0sOBGpcMVmEwQ96ghR9/MeisG+b8iroOWqO3ixgmciuXKIiAB470Lzn zO3ROdrQtPpBsJQsdkxctbakiKLHDUl+KDW+E81XHPI7lPHZyzbfFg/3+mlxlx8+Z0q/ XDzsnNqjijJ/9Bu1hoeopLq/RqIFFO30Zxf223o93lqQ0r6Ra591HLi6VozDu1Ro0RLZ rf/ZZKyn3tUemFrOq2wtIA8lIge/h0CjV1wxoIIoFaiGCnCdsVP9BaLiPd0rKSMlMuBp aPrscSxPk4qxx5WN8LIRuQZn0oSqBX2CyBF5BNiOG0DTor1l3wNSt59krgNYf/3+VbfW wB2g== MIME-Version: 1.0 X-Received: by 10.52.93.106 with SMTP id ct10mr1301841vdb.83.1372911039919; Wed, 03 Jul 2013 21:10:39 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Jul 2013 14:10:39 +1000 Subject: Re: Why this code works in python3, but not python 2: From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372911048 news.xs4all.nl 15863 [2001:888:2000:d::a6]:40672 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49805 On Thu, Jul 4, 2013 at 1:52 PM, Maciej Dziardziel wrote: > Out of curiosity: Does anyone know why the code below is valid in python3, but not python2: > > def foo(*args, bar=1, **kwargs): > pass Keyword-only arguments are (IIRC) a Py3-only feature. There are lots of features that don't work in Python 2 - that's simply the way things happen with old versions of software. ChrisA