Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'valueerror:': 0.07; 'wrapped': 0.07; 'python': 0.09; 'alan': 0.09; 'friday,': 0.09; 'length.': 0.09; 'to:addr:comp.lang.python': 0.09; 'variables,': 0.09; 'cc:addr :python-list': 0.10; 'dec': 0.15; 'sat,': 0.15; 'chris,': 0.16; 'incomplete': 0.16; 'looping': 0.16; 'presume': 0.16; 'wrote:': 0.17; 'variables': 0.17; 'suggested': 0.20; '"",': 0.22; 'skip:_ 20': 0.22; 'cc:2**0': 0.23; 'statement': 0.23; 'cc:no real name:2**0': 0.24; 'idea': 0.24; 'pass': 0.25; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; '(most': 0.27; 'am,': 0.27; 'chris': 0.28; 'long.': 0.29; 'loop,': 0.29; 'strings,': 0.29; 'wrap': 0.29; 'function': 0.30; 'error': 0.30; 'lists': 0.31; 'point': 0.31; 'december': 0.32; 'file': 0.32; 'getting': 0.33; 'safely': 0.33; 'traceback': 0.33; 'received:google.com': 0.34; '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; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'short': 0.39; 'end': 0.40; 'from:no real name:2**0': 0.60; 'more': 0.63; 'show': 0.63; 'within': 0.64; 'making': 0.64; 'here': 0.65; 'imagine': 0.96 Newsgroups: comp.lang.python Date: Fri, 28 Dec 2012 08:43:33 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=160.79.139.10; posting-account=egMkHAoAAADMT4BkILtuIRdIfguep-XT References: <7fcd8949-c781-425c-b6d2-7d0a634b12b7@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 160.79.139.10 MIME-Version: 1.0 Subject: Re: Wrapping statements in Python in SPSS From: alankrinsky@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: , Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356713758 news.xs4all.nl 6840 [2001:888:2000:d::a6]:48750 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35706 Chris, I tried placing in the format you suggested and received this error message= : END PROGRAM. Traceback (most recent call last): File "", line 396, in ValueError: incomplete format key ____________________ On Friday, December 28, 2012 11:10:10 AM UTC-5, Chris Angelico wrote: > On Sat, Dec 29, 2012 at 3:01 AM, alan wrote: > I am working with Python l= ooping in SPSS. What are the limits for the > > for var1, var2, var3 in zip= (Variable1, Variable2, Variable3): > > statement in the Python looping func= tion within SPSS? I am getting an error message, I presume because of wrapp= ing or length. Imagine the above statement, but expanded, as I am working w= ith more than 28 variables in this loop, and even making the names really s= hort is making the statement too long. Is it impossible to wrap and make th= is work? I know there are ways to wrap strings, including lists of variable= s, but here I have a statement/function. At what point are you wrapping it?= Can you show the wrapped form and the error message? As a general rule, yo= u can safely wrap anything that's inside parentheses. for ( var1, var2, var= 3 ) in zip( Variable1, Variable2, Variable3 ): pass That may be a tad exces= sive, but you get the idea :) ChrisA