Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:code': 0.07; '3.0,': 0.09; 'function:': 0.09; 'parameter': 0.09; 'pep': 0.09; 'python': 0.11; 'def': 0.12; '>>': 0.16; 'add(self,': 0.16; 'eclipse': 0.16; 'parentheses': 0.16; 'subject:Programming': 0.16; 'tuple': 0.16; 'unpacking': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'email addr:gmail.com>': 0.22; 'skip': 0.24; 'subject:Code': 0.24; '>': 0.26; 'header:In- Reply-To:1': 0.27; 'function': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; '25,': 0.31; '3.x': 0.31; 'allows': 0.31; 'fri,': 0.33; 'subject:the': 0.34; 'subject: (': 0.35; 'but': 0.35; 'received:google.com': 0.35; '2.6': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'first': 0.61; 'subject:. ': 0.67; 'line,': 0.68; 'jul': 0.74 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=Yy3aWM5uBkuIAQdy7zobccs0+5+k1ryXg32iPujJUu4=; b=HRe3wbaUxkXmLo/3JuSsgb5+T0xnwTz3WjtKzt04+IgijIHGYyyS/7xJvFVX8Z9i3K LpJabplfv/MkTwWwMto4BgaHWlLHOVbHTg0AyzBDHOs1TArAC3g/yuhSLMjiq4ghkURV xpiyfyGMxWF6T9Zn7yqdNzih31A50IQRRBlFbqz5K/yRmAwQ4PbMQiULbyxs69MLKuop 8iIgcg/qak64pra7Z1ebKFW9+G5DjBI6wQDn1Cuk3+j9mNDpbLhv6u3Kx/DvgoYWAeln OxRdJEkIV5ZCJC2bKn825OS32tmgW3c012NDPq1oNZdZCIA9x2azQ5Se0T319bnVOa3o +6zQ== MIME-Version: 1.0 X-Received: by 10.68.103.165 with SMTP id fx5mr22704883pbb.118.1406338764033; Fri, 25 Jul 2014 18:39:24 -0700 (PDT) In-Reply-To: References: <8e593a0d-cf61-4b1a-8273-8309496e3696@googlegroups.com> Date: Fri, 25 Jul 2014 19:39:23 -0600 Subject: Re: Prob. Code Downloaded for Programming the Semantic Web (python code) From: Ian Kelly To: Python Content-Type: multipart/alternative; boundary=047d7b67606276d54c04ff0ec2d6 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: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406338773 news.xs4all.nl 2890 [2001:888:2000:d::a6]:57318 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75220 --047d7b67606276d54c04ff0ec2d6 Content-Type: text/plain; charset=UTF-8 On Jul 25, 2014 6:54 PM, "Dan Stromberg" wrote: > > On Fri, Jul 25, 2014 at 5:21 PM, Skip Montanaro wrote: > >> OK, Eclipse with PyDev doesn't like this first line, with the function: > >> def add(self, (sub, pred, obj)): > >> > >> It complains about the parentheses just before sub. > > > > Seems like this code is Python 2.x. > > For me, this code ran on all of 2.4, 2.5, 2.6 and 2.7, but not on any > of 3.0, 3.1, 3.2, 3.3 or 3.4. Python 3.x no longer allows tuple parameter unpacking in function signatures. See PEP 3113. --047d7b67606276d54c04ff0ec2d6 Content-Type: text/html; charset=UTF-8


On Jul 25, 2014 6:54 PM, "Dan Stromberg" <drsalists@gmail.com> wrote:
>
> On Fri, Jul 25, 2014 at 5:21 PM, Skip Montanaro <skip@pobox.com> wrote:
> >> OK, Eclipse with PyDev doesn't like this first line, with the function:
> >> def add(self, (sub, pred, obj)):
> >>
> >> It complains about the parentheses just before sub.
> >
> > Seems like this code is Python 2.x.
>
> For me, this code ran on all of 2.4, 2.5, 2.6 and 2.7, but not on any
> of 3.0, 3.1, 3.2, 3.3 or 3.4.

Python 3.x no longer allows tuple parameter unpacking in function signatures. See PEP 3113.

--047d7b67606276d54c04ff0ec2d6--