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


Groups > comp.lang.python > #103894

Continuing indentation

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Skip Montanaro <skip.montanaro@gmail.com>
Newsgroups comp.lang.python
Subject Continuing indentation
Date Wed, 2 Mar 2016 14:43:38 -0600
Lines 31
Message-ID <mailman.113.1456951421.20602.python-list@python.org> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de IxeZUzjJ2elSbmfaKacCZACAFWepp6VtpdGR78DCih6w==
Return-Path <skip.montanaro@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.023
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'block.': 0.09; 'statements': 0.09; 'python': 0.10; 'complains': 0.16; 'editor,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'suppressing': 0.16; 'string': 0.17; 'skip': 0.18; 'creates': 0.18; 'matching': 0.23; 'this:': 0.23; 'second': 0.24; 'tried': 0.24; 'message- id:@mail.gmail.com': 0.27; 'gnu': 0.27; 'indentation': 0.29; 'mode.': 0.29; 'spaces': 0.29; "i'm": 0.30; 'code': 0.30; 'guess': 0.31; 'aside': 0.32; 'open': 0.33; 'case,': 0.34; 'running': 0.34; 'received:google.com': 0.35; 'next': 0.35; 'text': 0.35; 'problem.': 0.35; 'but': 0.36; 'too': 0.36; 'there': 0.36; 'lines': 0.36; 'tool': 0.36; 'received:209.85': 0.36; 'keyword': 0.36; 'to:addr:python-list': 0.36; 'missing': 0.37; 'received:209': 0.38; 'several': 0.38; 'well.': 0.40; 'to:addr:python.org': 0.40; 'space': 0.40; 'some': 0.40; 'overall': 0.72; 'paren': 0.84; 'to:name:python': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=P8dgodmskk9F8qj9WNHaIAHZFNQxek0MU7g4oPHXrSI=; b=O65aHGxaftuVNfnmkxwnjLgDxsqnoQ8HogNhLKcob58HS9gccrnw/KFck6PxT0VCDh v1bu5fl34FgnzzWnRUIDVD4uAmhg2iXZIlMyLI+Qlm3QMc6b3mKazbMa7JM+cAEz/4/S MW/S97V7DrkAltr5xn58x/xUubwrdhRU6OKU2Lddg8V4pM6GDC7kDHbr18Jib/fhSSwA hHgjvmyDP3VJAI7NWe4N8M+AUEkgg3axI0cDb8UNNPXZaa/6D0f1vjgkmSU2UsCxxlat 0TMJc5lO6A9zm7mdmB8XR2+Ltpt5lPoNLrILxXaeG6NuqME0Sjl6HvYToDo/mj679xBi 1wHg==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=P8dgodmskk9F8qj9WNHaIAHZFNQxek0MU7g4oPHXrSI=; b=a6fNAtX/xUQte4FNuk/cJKUwcdlfbOBRhzXJC5f9MwtMZ8TKPeoyE0qyqgWMBIR6gF URXLL/8+TFy930XSUWAzQ8xCrsEM5ko81i8hkdsKcNqmEpcU8wOIsFqdIOL52MFpn/vV SdKGHuO9aDxwL/4+NlyD8hdt2UFgY7hHUeCQegx7xP2GLyJQCSxDIyvWHBHpW71V8G1L Y3repehRjqy8uLb20ulbpYmq9BWOMHteZ3l0tAph/YGorcNBQYv6DsCxELQpcuwEKspH iDNmN0Bfl6hrmdce4hIicpMXf8yxAivgoOTMXvePHNRXZri/Peity6HfTnMQugwSGq6W u3NQ==
X-Gm-Message-State AD7BkJIPSZjmCuvNX87B7azJdbhB66GcA2kqQ7BtLcPc362piKd1VZ/KcwMNEb3jqGre25dgw3/T9hM7Iu93IA==
X-Received by 10.141.23.207 with SMTP id z198mr37721371qhd.52.1456951418387; Wed, 02 Mar 2016 12:43:38 -0800 (PST)
X-Content-Filtered-By Mailman/MimeDel 2.1.21
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
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:103894

Show key headers only | View raw


Running flake8 over some code which has if statements with multiple
conditions like this:

    if (some_condition and
        some_other_condition and
        some_final_condition):
        play_bingo()

the tool complains that the indentation of the conditions is the same
as the next block.  In this particular case, the overall conditions
are too long to string together on a single line. I tried placing a
second space after the if keyword:

    if  (some_condition and
         some_other_condition and
         some_final_condition):
        play_bingo()

which solves the matching indentation problem, but creates a multiple
spaces after keyword problem.  My guess is that adding a space after
the open paren would provoke a message as well.

I use GNU Emacs as my text editor, and its python mode.  I'm pretty
happy with everything (been using it in its current state for several
years).  Aside from manually or configure-ologically suppressing E129,
is there a better way to break lines I'm missing which will make
flake8 happy?

Thx,

Skip

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


Thread

Continuing indentation Skip Montanaro <skip.montanaro@gmail.com> - 2016-03-02 14:43 -0600
  Re: Continuing indentation Marko Rauhamaa <marko@pacujo.net> - 2016-03-02 22:50 +0200
    Re: Continuing indentation Ethan Furman <ethan@stoneleaf.us> - 2016-03-02 14:01 -0800
      Re: Continuing indentation Marko Rauhamaa <marko@pacujo.net> - 2016-03-03 00:10 +0200
        Re: Continuing indentation Skip Montanaro <skip.montanaro@gmail.com> - 2016-03-02 16:44 -0600
        Re: Continuing indentation Ethan Furman <ethan@stoneleaf.us> - 2016-03-02 14:51 -0800
        Re: Continuing indentation Ethan Furman <ethan@stoneleaf.us> - 2016-03-02 14:56 -0800
        Re: Continuing indentation Chris Angelico <rosuav@gmail.com> - 2016-03-03 10:46 +1100
        Re: Continuing indentation Steven D'Aprano <steve@pearwood.info> - 2016-03-03 13:15 +1100
        Re: Continuing indentation John Gordon <gordon@panix.com> - 2016-03-03 16:16 +0000
          Re: Continuing indentation Marko Rauhamaa <marko@pacujo.net> - 2016-03-03 18:47 +0200
            Re: Continuing indentation Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-03-03 18:06 +0000
              Re: Continuing indentation Marko Rauhamaa <marko@pacujo.net> - 2016-03-03 21:36 +0200
            Re: Continuing indentation Steven D'Aprano <steve@pearwood.info> - 2016-03-04 11:13 +1100
              Re: Continuing indentation INADA Naoki <songofacandy@gmail.com> - 2016-03-04 09:45 +0900
              Re: Continuing indentation Erik <python@lucidity.plus.com> - 2016-03-04 01:06 +0000
              Re: Continuing indentation INADA Naoki <songofacandy@gmail.com> - 2016-03-04 10:23 +0900
                Re: Continuing indentation Steven D'Aprano <steve@pearwood.info> - 2016-03-04 14:48 +1100
                Re: Continuing indentation cl@isbd.net - 2016-03-04 10:12 +0000
                Re: Continuing indentation alister <alister.ware@ntlworld.com> - 2016-03-04 14:03 +0000
                Re: Continuing indentation Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-04 08:25 -0700
                Re: Continuing indentation Ethan Furman <ethan@stoneleaf.us> - 2016-03-04 09:36 -0800
                Re: Continuing indentation sohcahtoa82@gmail.com - 2016-03-04 13:14 -0800
                Re: Continuing indentation Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-04 21:20 +0000
                Re: Continuing indentation Erik <python@lucidity.plus.com> - 2016-03-04 23:31 +0000
                Re: Continuing indentation Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-04 23:45 +0000
                Re: Continuing indentation Ethan Furman <ethan@stoneleaf.us> - 2016-03-04 15:53 -0800
                Re: Continuing indentation Simon Ward <simon+python@bleah.co.uk> - 2016-03-05 00:23 +0000
                Re: Continuing indentation sohcahtoa82@gmail.com - 2016-03-04 17:17 -0800
                Re: Continuing indentation Ethan Furman <ethan@stoneleaf.us> - 2016-03-04 18:14 -0800
                Re: Continuing indentation Ben Finney <ben+python@benfinney.id.au> - 2016-03-05 13:22 +1100
                Re: Continuing indentation Tim Chase <python.list@tim.thechases.com> - 2016-03-04 20:49 -0600
                Re: Continuing indentation srinivas devaki <mr.eightnoteight@gmail.com> - 2016-03-05 10:25 +0530
                Re: Continuing indentation Ben Finney <ben+python@benfinney.id.au> - 2016-03-05 16:10 +1100
                Re: Continuing indentation Erik <python@lucidity.plus.com> - 2016-03-05 00:52 +0000
                Re: Continuing indentation Ben Finney <ben+python@benfinney.id.au> - 2016-03-05 12:05 +1100
                Re: Continuing indentation Erik <python@lucidity.plus.com> - 2016-03-05 01:45 +0000
                Re: Continuing indentation Steven D'Aprano <steve@pearwood.info> - 2016-03-05 18:17 +1100
                Re: Continuing indentation alister <alister.ware@ntlworld.com> - 2016-03-04 13:59 +0000
                Re: Continuing indentation Ben Finney <ben+python@benfinney.id.au> - 2016-03-05 10:41 +1100
                Re: Continuing indentation sohcahtoa82@gmail.com - 2016-03-04 16:06 -0800
                Re: Continuing indentation Ben Finney <ben+python@benfinney.id.au> - 2016-03-05 11:30 +1100
                Re: Continuing indentation Ethan Furman <ethan@stoneleaf.us> - 2016-03-04 17:01 -0800
              Re: Continuing indentation Erik <python@lucidity.plus.com> - 2016-03-04 02:24 +0000
              Re: Continuing indentation Marko Rauhamaa <marko@pacujo.net> - 2016-03-04 08:28 +0200
  Re: Continuing indentation codewizard@gmail.com - 2016-03-02 15:46 -0800
    Re: Continuing indentation Chris Angelico <rosuav@gmail.com> - 2016-03-03 10:54 +1100
      Re: Continuing indentation Pete Forman <petef4+usenet@gmail.com> - 2016-03-03 00:23 +0000
    Re: Continuing indentation Carl Meyer <carl@oddbird.net> - 2016-03-02 17:02 -0700
      Re: Continuing indentation Steven D'Aprano <steve@pearwood.info> - 2016-03-03 13:22 +1100
        Re: Continuing indentation Ben Finney <ben+python@benfinney.id.au> - 2016-03-03 13:30 +1100
        Re: Continuing indentation Chris Angelico <rosuav@gmail.com> - 2016-03-03 13:33 +1100
        Re: Continuing indentation Ethan Furman <ethan@stoneleaf.us> - 2016-03-02 18:57 -0800
    Re: Continuing indentation Ben Finney <ben+python@benfinney.id.au> - 2016-03-03 11:30 +1100
    Re: Continuing indentation cl@isbd.net - 2016-03-03 10:22 +0000

csiph-web