Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.nosignal.org!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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'wrapped': 0.07; 'python': 0.09; 'length.': 0.09; 'variables,': 0.09; 'dec': 0.15; 'sat,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'looping': 0.16; 'presume': 0.16; 'wrote:': 0.17; 'variables': 0.17; 'statement': 0.23; 'idea': 0.24; 'pass': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'loop,': 0.29; 'strings,': 0.29; 'wrap': 0.29; 'function': 0.30; 'error': 0.30; 'lists': 0.31; 'point': 0.31; 'getting': 0.33; 'safely': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'really': 0.36; 'but': 0.36; 'anything': 0.36; 'too': 0.36; 'skip:z 10': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'short': 0.39; 'header:Received:5': 0.40; 'more': 0.63; 'show': 0.63; 'within': 0.64; 'making': 0.64; 'here': 0.65; 'imagine': 0.96 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:content-transfer-encoding; bh=BeUn4G/HuHzKqMvTWDgBE7kJL1EU3tMuoAD3d3aaxiQ=; b=dmBstGtJ9fL8sXvT2YL++i2rxG6qFrjNcqVQTZaBA8DDu/115HcVM1rkBlAOuupoxq evktzJkyyO8qQyWgNL+pN8HjhAqoPs4/Nd4eOZ/Tg87Jt/6I/wQJ6HjuYTWrdw1Lxwlm Obf/XyPGpSf8QSeeCBw/UcVOlsFLKBZTV1mFaj+DJAhtypj7gph3+4ZpEEf5kvXu2QQ6 ItvY7QEr/29USZTEnYQYAuxDg3xkbsE2CN/TX4NkZTFyhujJo015ZSUpkLdelfm5NjAe rAOsn61Fct2PGvIp/jlAYEAZZhohZcwxbZz03Me0jiGaiIEatSdh5mqKKlxxTV2huqNs Bz5g== MIME-Version: 1.0 In-Reply-To: <7fcd8949-c781-425c-b6d2-7d0a634b12b7@googlegroups.com> References: <7fcd8949-c781-425c-b6d2-7d0a634b12b7@googlegroups.com> Date: Sat, 29 Dec 2012 03:10:10 +1100 Subject: Re: Wrapping statements in Python in SPSS From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356711013 news.xs4all.nl 6885 [2001:888:2000:d::a6]:41330 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35704 On Sat, Dec 29, 2012 at 3:01 AM, wrote: > I am working with Python looping in SPSS. What are the limits for the > > for var1, var2, var3 in zip(Variable1, Variable2, Variable3): > > statement in the Python looping function within SPSS? I am getting an err= or message, I presume because of wrapping or length. Imagine the above stat= ement, but expanded, as I am working with more than 28 variables in this lo= op, and even making the names really short is making the statement too long= . Is it impossible to wrap and make this work? I know there are ways to wra= p strings, including lists of variables, but here I have a statement/functi= on. At what point are you wrapping it? Can you show the wrapped form and the error message? As a general rule, you can safely wrap anything that's inside parentheses. for ( var1, var2, var3 ) in zip( Variable1, Variable2, Variable3 ): pass That may be a tad excessive, but you get the idea :) ChrisA