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


Groups > comp.lang.python > #102390

Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up

Path csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From Vincent Davis <vincent@vincentdavis.net>
Newsgroups comp.lang.python
Subject Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up
Date Mon, 1 Feb 2016 11:40:26 -0700
Lines 22
Message-ID <mailman.5.1454352055.3032.python-list@python.org> (permalink)
References <n8k448$3pd$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de 9E3/y7SGi8b+nkZASwgt0AIfLzzkLczh1seznlohaCqw==
Return-Path <vincent@vincentdavis.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'except:': 0.07; 'cc:addr :python-list': 0.09; 'dict': 0.09; 'url:github': 0.09; 'received:209.85.218': 0.10; 'jan': 0.11; 'subject: \n ': 0.15; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'try:': 0.18; 'email addr:gmail.com&gt;': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'sat,': 0.23; 'header :In-Reply-To:1': 0.24; 'example': 0.26; 'message- id:@mail.gmail.com': 0.27; "can't": 0.32; 'subject:all': 0.32; 'wrap': 0.33; 'list': 0.34; 'received:google.com': 0.35; 'something': 0.35; 'there': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'doing': 0.38; 'received:209': 0.38; 'stuff': 0.38; 'some': 0.40; 'here.': 0.62; '30,': 0.63; 'better.': 0.66; 'url:master': 0.84; 'do:': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=vincentdavis.net; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=VEnvEOYbGS9APqi1/8FdS1aSvBhTSRcvZ9MjRqgQKrc=; b=MV/+5IQtX4sKR6ayUhTmQbm62VTaTqYjtFE9xeCJaQVBr4+ZYlLaKxZUDpbzTvvOW2 Lgu0T5uvvcLjs0pSE/ZYaMu8VnDAT3Nz2nS1GjZziN5meOrnRbFGHoHNZK5uyQAuu/Bc qTnaHB8nHPoqFHb76WqgaY4I4NbXl/dav4tkA=
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=VEnvEOYbGS9APqi1/8FdS1aSvBhTSRcvZ9MjRqgQKrc=; b=RcUTyZg113RlCOL0IYs6/lztZsk0OFQrwBHN3Pi5/heR9p67S3dLldzhYQ8cnYaGq4 Jm9ikKkiMc0nTBr9RbtbeSK1LxonaaIJG/mfXcUP4a0hhJBazKys2S7O+dUPkZRSFYer KaSJJQYjxa7anKHWi5ydFT/dzMOcm22ak1If/SqYOiZZxCpAwvekpIXWg4EHXqpeS2hw 4IETyis3P9bbbDCM3pAn0JhOFSaik3CtXl7+vBsagtyhrU8eAMaQTw/O1Y3TtRffws9k UlBcXYtB1WXkuWm9i+G7UOz2EKJ80rPWr9xA3cr4ihwfsr5phd/drOshlWmG2rhMHw+s Th6Q==
X-Gm-Message-State AG10YOQWdmh2X1KoOnpCrulavbDo2GfVlfPLZdsUdNnuYklM3E2ZDmfyQOGWFyitDnvEzQdLLH0N87XagbpaaWPE
X-Received by 10.202.239.212 with SMTP id n203mr18782707oih.77.1454352046327; Mon, 01 Feb 2016 10:40:46 -0800 (PST)
In-Reply-To <n8k448$3pd$1@dont-email.me>
X-Content-Filtered-By Mailman/MimeDel 2.1.20+
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:102390

Show key headers only | View raw


On Sat, Jan 30, 2016 at 9:58 PM, Veek. M <vek.m1234@gmail.com> wrote:

> Is there some other nice way to wrap this stuff up?
> I can't do:
> try:
>  x=
>  y=
>  z=
> except:
>

I happend to


Have just been doing the something
similar. You can put x,y,x in a list and loop over it. In my case a dict
was better.
See the example here.
https://github.com/vincentdavis/USAC_data/blob/master/tools.py#L24

Vincent Davis
720-301-3003

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


Thread

x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up "Veek. M" <vek.m1234@gmail.com> - 2016-01-31 10:28 +0530
  Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up Chris Angelico <rosuav@gmail.com> - 2016-01-31 16:23 +1100
    Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up "Veek. M" <vek.m1234@gmail.com> - 2016-01-31 11:59 +0530
      Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up "Veek. M" <vek.m1234@gmail.com> - 2016-01-31 12:01 +0530
      Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up Steven D'Aprano <steve@pearwood.info> - 2016-01-31 20:21 +1100
        Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up Chris Angelico <rosuav@gmail.com> - 2016-01-31 20:40 +1100
          Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up Steven D'Aprano <steve@pearwood.info> - 2016-01-31 21:14 +1100
            Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up Chris Angelico <rosuav@gmail.com> - 2016-02-01 00:27 +1100
      Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up Peter Otten <__peter__@web.de> - 2016-01-31 11:40 +0100
      Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up Larry Hudson <orgnut@yahoo.com> - 2016-01-31 13:27 -0800
  Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up Steven D'Aprano <steve@pearwood.info> - 2016-01-31 18:22 +1100
  Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up "Veek. M" <vek.m1234@gmail.com> - 2016-01-31 20:55 +0530
  Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up Vincent Davis <vincent@vincentdavis.net> - 2016-02-01 11:40 -0700

csiph-web