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!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'syntax': 0.04; 'modify': 0.07; 'versions.': 0.07; 'snippet': 0.09; 'subject:parsing': 0.09; 'val': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'replace': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'work.': 0.31; 'running': 0.33; 'fri,': 0.33; 'subject:from': 0.34; 'could': 0.34; 'received:google.com': 0.35; 'yield': 0.36; 'should': 0.36; 'either': 0.39; 'then,': 0.60; "you're": 0.61; '30,': 0.65; 'worth': 0.66; 'improvements': 0.68; '2015': 0.84; 'to:none': 0.92 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:cc :content-type; bh=inMgzVrQrRDoIfoR7Ved/kgRLr8fyKeEdMgrR9dAqE0=; b=FEOC8c8/j5Ssh/qC29x+kCV1nMSj2qTmTGdlEjQu2jPooTIGygSUm4oiJjdWwtEPNe 8kEUvpOfFLEqwSHWDcXY314JDp3etYC+8mx6J17WmfdR7NZfkeKl8IcE8opjRjLPZP/z O/hil9hWzqIeqAo08lgftQKEUXArxVY8bYMASMyV66eFRtEbYiXt9g0G1Swy8UWKb7Nx DG7hSDeDE+slPyecycxFk72/0ppBOFeWtzWXVmoFgQcpzVBO1nS0Bd609+mio4tFZTg1 /NLqGZpxWBnOQHAGNYrjDgzVBDH7+Sr3Xaw6vryTXkXh4+KLDyqvD1Zo3sSm2JFE/Dfj bSdA== MIME-Version: 1.0 X-Received: by 10.42.95.12 with SMTP id d12mr3524656icn.12.1422575201885; Thu, 29 Jan 2015 15:46:41 -0800 (PST) In-Reply-To: References: Date: Fri, 30 Jan 2015 10:46:41 +1100 Subject: Re: parsing tree from excel sheet From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1422575211 news.xs4all.nl 2889 [2001:888:2000:d::a6]:36622 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84857 On Fri, Jan 30, 2015 at 8:32 AM, alb wrote: > Ok, that either means I need to upgrade to 3.3 or need to modify the > snippet to a suitable syntax that would work with other versions. You could replace "yield from child.show2()" with: for val in child.show2(): yield val and it should work. However, you're running Python 3.1, and a *lot* of improvements have been made since then, so it's well worth upgrading. ChrisA