Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35706

Re: Wrapping statements in Python in SPSS

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 <alankrinsky@gmail.com>
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 <mailman.1397.1356711013.29569.python-list@python.org>
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> <mailman.1397.1356711013.29569.python-list@python.org>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.1398.1356713758.29569.python-list@python.org> (permalink)
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

Show key headers only | View raw


Chris,

I tried placing in the format you suggested and received this error message:

END PROGRAM.
Traceback (most recent call last):
  File "<string>", line 396, in <module>
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 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 error message, I presume because of wrapping or length. Imagine the above statement, but expanded, as I am working with more than 28 variables in this loop, 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 wrap strings, including lists of variables, 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, 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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 08:01 -0800
  Re: Wrapping statements in Python in SPSS Chris Angelico <rosuav@gmail.com> - 2012-12-29 03:10 +1100
    Re: Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 08:43 -0800
      Re: Wrapping statements in Python in SPSS Peter Otten <__peter__@web.de> - 2012-12-28 18:07 +0100
      Re: Wrapping statements in Python in SPSS Chris Angelico <rosuav@gmail.com> - 2012-12-29 04:12 +1100
        Re: Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 09:33 -0800
          Re: Wrapping statements in Python in SPSS Mitya Sirenef <msirenef@lightbird.net> - 2012-12-28 12:55 -0500
          Re: Wrapping statements in Python in SPSS Mitya Sirenef <msirenef@lightbird.net> - 2012-12-28 13:05 -0500
          Re: Wrapping statements in Python in SPSS Mitya Sirenef <msirenef@lightbird.net> - 2012-12-28 13:20 -0500
        Re: Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 09:33 -0800
    Re: Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 08:43 -0800

csiph-web