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


Groups > comp.lang.python > #107077 > unrolled thread

Guido sees the light: PEP 8 updated

Started bySteven D'Aprano <steve@pearwood.info>
First post2016-04-16 14:38 +1000
Last post2016-04-18 05:45 +1000
Articles 20 on this page of 142 — 36 participants

Back to article view | Back to comp.lang.python


Contents

  Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-16 14:38 +1000
    Re: Guido sees the light: PEP 8 updated Bob Martin <bob.martin@excite.com> - 2016-04-16 08:05 +0100
      Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-16 11:06 +0300
        Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-16 18:32 +1000
          Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-16 11:51 +0300
            Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-16 19:30 +1000
            Re: Guido sees the light: PEP 8 updated Michael Selik <michael.selik@gmail.com> - 2016-04-16 09:34 +0000
            Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-16 22:03 +1000
            Re: Guido sees the light: PEP 8 updated Stephen Hansen <me+python@ixokai.io> - 2016-04-16 05:32 -0700
            Re: Guido sees the light: PEP 8 updated Larry Martell <larry.martell@gmail.com> - 2016-04-16 10:53 -0400
              Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-16 19:51 +0300
                Re: Guido sees the light: PEP 8 updated Larry Martell <larry.martell@gmail.com> - 2016-04-16 12:58 -0400
                  Re: Guido sees the light: PEP 8 updated BartC <bc@freeuk.com> - 2016-04-16 19:18 +0100
                    Re: Guido sees the light: PEP 8 updated Larry Martell <larry.martell@gmail.com> - 2016-04-16 14:53 -0400
                    Re: Guido sees the light: PEP 8 updated alex wright <wrightalexw@gmail.com> - 2016-04-16 15:21 -0400
                    Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-16 19:08 -0400
                Re: Guido sees the light: PEP 8 updated Terry Reedy <tjreedy@udel.edu> - 2016-04-16 13:25 -0400
                  Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-16 21:33 +0300
                Re: Guido sees the light: PEP 8 updated Ethan Furman <ethan@stoneleaf.us> - 2016-04-16 12:07 -0700
                Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-17 06:08 +1000
                Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-16 16:50 -0500
                Re: Guido sees the light: PEP 8 updated Tim Delaney <timothy.c.delaney@gmail.com> - 2016-04-17 08:15 +1000
                  Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-17 01:30 +0300
                    Re: Guido sees the light: PEP 8 updated Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-17 07:38 -0600
                Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-16 19:02 -0400
                  Re: Guido sees the light: PEP 8 updated Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-17 00:25 +0100
                    Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-17 09:33 +1000
                      Re: Guido sees the light: PEP 8 updated Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-17 01:29 +0100
                    Re: Guido sees the light: PEP 8 updated alex wright <wrightalexw@gmail.com> - 2016-04-16 19:43 -0400
                Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-17 09:11 +1000
                Re: Guido sees the light: PEP 8 updated Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-16 23:19 +0000
                Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-16 19:12 -0500
                Re: Guido sees the light: PEP 8 updated MRAB <python@mrabarnett.plus.com> - 2016-04-17 01:24 +0100
                Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-16 20:30 -0500
                  Re: Guido sees the light: PEP 8 updated Coos Haak <chforth@hccnet.nl> - 2016-04-17 16:35 +0200
                    Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-17 13:11 -0500
                Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-16 21:59 -0400
                Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-16 20:44 -0700
                  Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-17 13:49 +1000
                    Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-17 18:39 -0700
                      Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-18 13:19 +1000
                        Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-17 20:48 -0700
                        Re: Guido sees the light: PEP 8 updated David Palao <dpalao.python@gmail.com> - 2016-04-18 13:35 +0200
                  Re: Guido sees the light: PEP 8 updated BartC <bc@freeuk.com> - 2016-04-17 11:04 +0100
                    Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-17 21:06 -0700
                      Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-18 21:03 +1200
                        Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-18 04:07 -0700
                  Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-17 14:01 +0300
                    Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-17 21:14 +1000
                      Re: Guido sees the light: PEP 8 updated BartC <bc@freeuk.com> - 2016-04-17 13:04 +0100
                      Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-17 15:10 +0300
                        Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-18 08:13 +1000
                    Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-18 11:57 +1000
                      Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-18 11:02 +0300
                        Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-18 20:43 +1200
                          Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-18 12:17 +0300
                Re: Guido sees the light: PEP 8 updated eryk sun <eryksun@gmail.com> - 2016-04-17 00:01 -0500
                Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-17 01:10 -0400
                Re: Guido sees the light: PEP 8 updated eryk sun <eryksun@gmail.com> - 2016-04-17 03:14 -0500
                Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-17 12:13 -0400
                Re: Guido sees the light: PEP 8 updated eryk sun <eryksun@gmail.com> - 2016-04-17 15:24 -0500
                Re: Guido sees the light: PEP 8 updated Michael Torrie <torriem@gmail.com> - 2016-04-17 14:41 -0600
                  Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-18 11:56 +1200
                    Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-17 20:29 -0400
                Re: Guido sees the light: PEP 8 updated Sivan Greenberg <sivan@vitakka.co> - 2016-04-18 16:35 +0300
                  Re: Guido sees the light: PEP 8 updated Pete Forman <petef4+usenet@gmail.com> - 2016-04-18 22:14 +0100
                    Re: Guido sees the light: PEP 8 updated Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-18 15:29 -0600
                      Re: Guido sees the light: PEP 8 updated Pete Forman <petef4+usenet@gmail.com> - 2016-04-18 23:20 +0100
                      Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-19 17:39 +1200
                    Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-19 08:58 +1000
                    Re: Guido sees the light: PEP 8 updated sohcahtoa82@gmail.com - 2016-04-18 18:19 -0700
                      Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-18 20:04 -0700
                        Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-18 23:29 -0400
                          Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-18 20:54 -0700
                            Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 00:11 -0400
                              Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 05:55 -0700
                                Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 10:05 -0400
                                Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 00:13 +1000
                        Re: Guido sees the light: PEP 8 updated Pete Forman <petef4+usenet@gmail.com> - 2016-04-19 08:34 +0100
                          Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-19 18:04 +1000
                          Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-19 11:09 +0300
                            Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-19 18:17 +1000
                              Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 04:37 -0700
                                Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 08:17 -0500
                                  Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 07:10 -0700
                          Re: Guido sees the light: PEP 8 updated Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-19 14:15 +0000
                            Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 07:54 -0700
                              Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 01:50 +1000
                                Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 01:58 +1000
                                Re: Guido sees the light: PEP 8 updated Larry Martell <larry.martell@gmail.com> - 2016-04-19 13:06 -0400
                                Re: Guido sees the light: PEP 8 updated alister <alister.ware@ntlworld.com> - 2016-04-19 17:13 +0000
                          Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 00:24 +1000
                        Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 02:14 +1000
                          Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 09:46 -0700
                            Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 12:43 -0500
                              Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 11:05 -0700
                            Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 14:54 -0400
                              Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 10:34 +1000
                                Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 22:02 -0400
                              Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 11:38 +1000
                                Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 12:21 +1000
                                Re: Guido sees the light: PEP 8 updated Terry Reedy <tjreedy@udel.edu> - 2016-04-19 23:23 -0400
                                Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 13:41 +1000
                                Re: Guido sees the light: PEP 8 updated Terry Reedy <tjreedy@udel.edu> - 2016-04-20 02:08 -0400
                                  Re: Guido sees the light: PEP 8 updated wxjmfauth@gmail.com - 2016-04-20 00:48 -0700
                                Re: Guido sees the light: PEP 8 updated Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-04-20 10:24 +0100
                                Re: Guido sees the light: PEP 8 updated Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-04-20 10:26 +0100
                                Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-20 07:51 -0400
                              Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 21:04 -0700
                            Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-20 06:50 +1000
                            Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 06:59 +1000
                              Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-20 00:35 +0300
                                Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 11:03 +1000
                                  Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 21:13 -0700
                                    Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-20 18:39 +1200
                              Re: Guido sees the light: PEP 8 updated sohcahtoa82@gmail.com - 2016-04-19 14:43 -0700
                            Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-19 19:20 -0400
                            Re: Guido sees the light: PEP 8 updated Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-19 23:22 +0000
                            Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 09:33 +1000
                            Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 19:02 -0500
                            Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 10:32 +1000
                            Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 21:57 -0400
                    Re: Guido sees the light: PEP 8 updated wxjmfauth@gmail.com - 2016-04-19 01:49 -0700
                    Re: Guido sees the light: PEP 8 updated Paul Rudin <paul.nospam@rudin.co.uk> - 2016-04-19 11:49 +0100
                      Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-19 14:47 +0300
                        Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 05:06 -0700
                          Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-19 15:14 +0300
                        Re: Guido sees the light: PEP 8 updated Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-04-19 15:07 +0200
                        Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 08:31 -0500
                        Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-19 23:41 +1000
                        Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 08:50 -0500
                    Re: Guido sees the light: PEP 8 updated Alice Bevan–McGregor <alice@gothcandy.com> - 2016-04-19 10:45 -0400
            Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Ben Finney <ben+python@benfinney.id.au> - 2016-04-17 06:21 +1000
            Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Chris Angelico <rosuav@gmail.com> - 2016-04-17 06:31 +1000
            Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Random832 <random832@fastmail.com> - 2016-04-16 16:44 -0400
              Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Dan Sommers <dan@tombstonezero.net> - 2016-04-16 21:22 +0000
                Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Chris Angelico <rosuav@gmail.com> - 2016-04-17 07:34 +1000
                  Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Dan Sommers <dan@tombstonezero.net> - 2016-04-16 23:35 +0000
                    Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Steven D'Aprano <steve@pearwood.info> - 2016-04-17 11:48 +1000
                      Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Dan Sommers <dan@tombstonezero.net> - 2016-04-17 03:52 +0000
              Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Steven D'Aprano <steve@pearwood.info> - 2016-04-17 11:38 +1000
            Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Chris Angelico <rosuav@gmail.com> - 2016-04-18 05:45 +1000

Page 1 of 8  [1] 2 3 4 5 6 7 8  Next page →


#107077 — Guido sees the light: PEP 8 updated

FromSteven D'Aprano <steve@pearwood.info>
Date2016-04-16 14:38 +1000
SubjectGuido sees the light: PEP 8 updated
Message-ID<5711c1b3$0$1596$c3e8da3$5496439d@news.astraweb.com>
Until now, PEP 8 has recommended that multi-line expressions should break
*after* infix operators:


result = (this_value *
          some_value +
          another_value -
          excess_value or
          default_value
          )


After a mercifully short discussion on the Python-Ideas mailing list, Guido
has been persuaded to change PEP 8 to recommend that the break should occur
*before* the infix operator:


result = (this_value 
          * some_value
          + another_value
          - excess_value
          or default_value
          )


This makes me happy :-)


Guido's announcement, including links to relevant discussion:

https://mail.python.org/pipermail/python-dev/2016-April/144205.html



-- 
Steven

[toc] | [next] | [standalone]


#107083

FromBob Martin <bob.martin@excite.com>
Date2016-04-16 08:05 +0100
Message-ID<dne6huFi9sfU1@mid.individual.net>
In reply to#107077
in 758117 20160416 053809 Steven D'Aprano <steve@pearwood.info> wrote:
>Until now, PEP 8 has recommended that multi-line expressions should break
>*after* infix operators:
>
>
>result = (this_value *
>some_value +
>another_value -
>excess_value or
>default_value
>)
>
>
>After a mercifully short discussion on the Python-Ideas mailing list, Guido
>has been persuaded to change PEP 8 to recommend that the break should occur
>*before* the infix operator:
>
>
>result = (this_value
>* some_value
>+ another_value
>- excess_value
>or default_value
>)
>
>
>This makes me happy :-)

That's how I've always done it.

>
>
>Guido's announcement, including links to relevant discussion:
>
>https://mail.python.org/pipermail/python-dev/2016-April/144205.html

[toc] | [prev] | [next] | [standalone]


#107087

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-04-16 11:06 +0300
Message-ID<87shym6kpo.fsf@elektro.pacujo.net>
In reply to#107083
Bob Martin <bob.martin@excite.com>:

> in 758117 20160416 053809 Steven D'Aprano <steve@pearwood.info> wrote:
>>Until now, PEP 8 has recommended that multi-line expressions should
>>break *after* infix operators:
>>
>>
>>result = (this_value *
>>some_value +
>>another_value -
>>excess_value or
>>default_value
>>)
>>
>>
>>After a mercifully short discussion on the Python-Ideas mailing list,
>>Guido has been persuaded to change PEP 8 to recommend that the break
>>should occur *before* the infix operator:
>>
>>
>>result = (this_value
>>* some_value
>>+ another_value
>>- excess_value
>>or default_value
>>)
>>
>>
>>This makes me happy :-)
>
> That's how I've always done it.

It doesn't really matter one way or another. The true WTF is that it's
been changed.


Marko

[toc] | [prev] | [next] | [standalone]


#107088

FromChris Angelico <rosuav@gmail.com>
Date2016-04-16 18:32 +1000
Message-ID<mailman.43.1460795561.6324.python-list@python.org>
In reply to#107087
On Sat, Apr 16, 2016 at 6:06 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> It doesn't really matter one way or another. The true WTF is that it's
> been changed.

Why? Was PEP 8 inscribed on stone tablets carried down from a mountain?

ChrisA

[toc] | [prev] | [next] | [standalone]


#107089

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-04-16 11:51 +0300
Message-ID<87h9f26ioa.fsf@elektro.pacujo.net>
In reply to#107088
Chris Angelico <rosuav@gmail.com>:

> On Sat, Apr 16, 2016 at 6:06 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
>> It doesn't really matter one way or another. The true WTF is that it's
>> been changed.
>
> Why? Was PEP 8 inscribed on stone tablets carried down from a mountain?

In a way, yes.

I don't follow PEP 8 to the tee; probably nobody does. However, I don't
see the point of turning truckloads of exemplary Python code into
truckloads of substandard Python code.


Marko

[toc] | [prev] | [next] | [standalone]


#107091

FromChris Angelico <rosuav@gmail.com>
Date2016-04-16 19:30 +1000
Message-ID<mailman.45.1460799029.6324.python-list@python.org>
In reply to#107089
On Sat, Apr 16, 2016 at 6:51 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Chris Angelico <rosuav@gmail.com>:
>
>> On Sat, Apr 16, 2016 at 6:06 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
>>> It doesn't really matter one way or another. The true WTF is that it's
>>> been changed.
>>
>> Why? Was PEP 8 inscribed on stone tablets carried down from a mountain?
>
> In a way, yes.
>
> I don't follow PEP 8 to the tee; probably nobody does. However, I don't
> see the point of turning truckloads of exemplary Python code into
> truckloads of substandard Python code.

Let me quote to you from the most important section of PEP 8.

"""
A style guide is about consistency. Consistency with this style guide
is important. Consistency within a project is more important.
Consistency within one module or function is the most important.

However, know when to be inconsistent -- sometimes style guide
recommendations just aren't applicable. When in doubt, use your best
judgment. Look at other examples and decide what looks best. And don't
hesitate to ask!
"""
(from the section "A Foolish Consistency is the Hobgoblin of Little Minds")

Maybe we need a blog post "Falsehoods Programmers Believe About PEP
8", along the lines of the ones about time and names. Remember, every
one of these is false.

* All Python code should follow PEP 8.
* If you use a tool named pep8, your code will be PEP 8 compliant.
* If your code is PEP 8 compliant, a tool named pep8 will accept it.
* The Python Standard Library is PEP 8 compliant.
* Okay, at least the new parts of the standard library are PEP 8 compliant.
* PEP 8 compliant code is inherently better than non-compliant code.
* PEP8-ing existing code will improve it.
* Once code is PEP 8 compliant, it can easily be kept that way through
subsequent edits.
* PEP 8 never changes.
* Well, it never materially changes.
* I mean, new advice, sure, but it'll never actually go back on a rule.

Contributions welcomed.

ChrisA

[toc] | [prev] | [next] | [standalone]


#107093

FromMichael Selik <michael.selik@gmail.com>
Date2016-04-16 09:34 +0000
Message-ID<mailman.47.1460799286.6324.python-list@python.org>
In reply to#107089
On Sat, Apr 16, 2016, 10:56 AM Marko Rauhamaa <marko@pacujo.net> wrote:

> Chris Angelico <rosuav@gmail.com>:
>
> > On Sat, Apr 16, 2016 at 6:06 PM, Marko Rauhamaa <marko@pacujo.net>
> wrote:
> >> It doesn't really matter one way or another. The true WTF is that it's
> >> been changed.
> >
> > Why? Was PEP 8 inscribed on stone tablets carried down from a mountain?
>
> In a way, yes.
>
> I don't follow PEP 8 to the tee; probably nobody does. However, I don't
> see the point of turning truckloads of exemplary Python code into
> truckloads of substandard Python code.
>

A change to PEP 8 does not change the quality of any code. Many teams
follow their own, different styles.

>

[toc] | [prev] | [next] | [standalone]


#107094

FromSteven D'Aprano <steve@pearwood.info>
Date2016-04-16 22:03 +1000
Message-ID<57122a08$0$1584$c3e8da3$5496439d@news.astraweb.com>
In reply to#107089
On Sat, 16 Apr 2016 06:51 pm, Marko Rauhamaa wrote:

> Chris Angelico <rosuav@gmail.com>:
> 
>> On Sat, Apr 16, 2016 at 6:06 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
>>> It doesn't really matter one way or another. The true WTF is that it's
>>> been changed.
>>
>> Why? Was PEP 8 inscribed on stone tablets carried down from a mountain?
> 
> In a way, yes.
> 
> I don't follow PEP 8 to the tee; probably nobody does. However, I don't
> see the point of turning truckloads of exemplary Python code into
> truckloads of substandard Python code.


In Guido's own words:

The update is already serving its real purpose: showing that style is
debatable and cannot always easily be reduced to fixed rules.

https://mail.python.org/pipermail/python-dev/2016-April/144211.html


GvR is not a fan of the automatic and compulsory application of PEP 8
conventions without thought, so I don't think he would agree with you that
a change in the preferred style automatically and necessarily
converts "exemplary Python code" into "substandard Python code".




-- 
Steven

[toc] | [prev] | [next] | [standalone]


#107095

FromStephen Hansen <me+python@ixokai.io>
Date2016-04-16 05:32 -0700
Message-ID<mailman.49.1460809925.6324.python-list@python.org>
In reply to#107089
On Sat, Apr 16, 2016, at 01:51 AM, Marko Rauhamaa wrote:
> Chris Angelico <rosuav@gmail.com>:
> 
> > On Sat, Apr 16, 2016 at 6:06 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> >> It doesn't really matter one way or another. The true WTF is that it's
> >> been changed.
> >
> > Why? Was PEP 8 inscribed on stone tablets carried down from a mountain?
> 
> In a way, yes.
> 
> I don't follow PEP 8 to the tee; probably nobody does. However, I don't
> see the point of turning truckloads of exemplary Python code into
> truckloads of substandard Python code.

This attitude is part of the problem: not following PEP8 does not make
code "substandard". PEP8 was never meant to be an authoritative metric
of 'good'. Its a set of guidelines that are subject to change over time
(this isn't even KINDA the first change!) and represent the core devs
taste and particular needs, and it goes out of its way to say that it is
only a suggestion and other concerns (especially local consistency)
override its advice.

---
Stephen Hansen
  m e @ i x o k a i . i o

[toc] | [prev] | [next] | [standalone]


#107096

FromLarry Martell <larry.martell@gmail.com>
Date2016-04-16 10:53 -0400
Message-ID<mailman.50.1460818461.6324.python-list@python.org>
In reply to#107089
On Sat, Apr 16, 2016 at 8:32 AM, Stephen Hansen <me+python@ixokai.io> wrote:
> On Sat, Apr 16, 2016, at 01:51 AM, Marko Rauhamaa wrote:
>> Chris Angelico <rosuav@gmail.com>:
>>
>> > On Sat, Apr 16, 2016 at 6:06 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
>> >> It doesn't really matter one way or another. The true WTF is that it's
>> >> been changed.
>> >
>> > Why? Was PEP 8 inscribed on stone tablets carried down from a mountain?
>>
>> In a way, yes.
>>
>> I don't follow PEP 8 to the tee; probably nobody does. However, I don't
>> see the point of turning truckloads of exemplary Python code into
>> truckloads of substandard Python code.
>
> This attitude is part of the problem: not following PEP8 does not make
> code "substandard". PEP8 was never meant to be an authoritative metric
> of 'good'. Its a set of guidelines that are subject to change over time
> (this isn't even KINDA the first change!) and represent the core devs
> taste and particular needs, and it goes out of its way to say that it is
> only a suggestion and other concerns (especially local consistency)
> override its advice.

I have worked for many companies where you are required to get a clean
run of pep8 on your code before your pull request will even be
considered for approval. I don't agree with this at all, as I think it
makes the code very ugly, especially enforcing the max line length.

I have referred people to this, but it fell on blind eyes:

https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds

[toc] | [prev] | [next] | [standalone]


#107101

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-04-16 19:51 +0300
Message-ID<878u0d7az5.fsf@elektro.pacujo.net>
In reply to#107096
Larry Martell <larry.martell@gmail.com>:

> I have worked for many companies where you are required to get a clean
> run of pep8 on your code before your pull request will even be
> considered for approval. I don't agree with this at all, as I think it
> makes the code very ugly, especially enforcing the max line length.

Agh, I was with you until your last remark.

A max line length of 79 characters is among the *only* rigorous
principles I judge coding style on.

It comes with the maxim that one function must be visible at once on the
screen.


Marko

[toc] | [prev] | [next] | [standalone]


#107102

FromLarry Martell <larry.martell@gmail.com>
Date2016-04-16 12:58 -0400
Message-ID<mailman.54.1460825978.6324.python-list@python.org>
In reply to#107101
On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Larry Martell <larry.martell@gmail.com>:
>
>> I have worked for many companies where you are required to get a clean
>> run of pep8 on your code before your pull request will even be
>> considered for approval. I don't agree with this at all, as I think it
>> makes the code very ugly, especially enforcing the max line length.
>
> Agh, I was with you until your last remark.
>
> A max line length of 79 characters is among the *only* rigorous
> principles I judge coding style on.
>
> It comes with the maxim that one function must be visible at once on the
> screen.

if we still had 1970's 80 character TTYs that would matter but on my
29" 1920x1080 screen it doesn't.

[toc] | [prev] | [next] | [standalone]


#107105

FromBartC <bc@freeuk.com>
Date2016-04-16 19:18 +0100
Message-ID<netvf2$oin$1@dont-email.me>
In reply to#107102
On 16/04/2016 17:58, Larry Martell wrote:
> On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
>> Larry Martell <larry.martell@gmail.com>:
>>
>>> I have worked for many companies where you are required to get a clean
>>> run of pep8 on your code before your pull request will even be
>>> considered for approval. I don't agree with this at all, as I think it
>>> makes the code very ugly, especially enforcing the max line length.
>>
>> Agh, I was with you until your last remark.
>>
>> A max line length of 79 characters is among the *only* rigorous
>> principles I judge coding style on.
>>
>> It comes with the maxim that one function must be visible at once on the
>> screen.
>
> if we still had 1970's 80 character TTYs that would matter but on my
> 29" 1920x1080 screen it doesn't.

There are reasons why 'broadsheet' newspapers don't have a single wide 
column spanning the entire width of the page, but are divided into 
multiple columns.

(But I think 80 columns is a bit limited. Maybe 100 or 132.)

-- 
Bartc

[toc] | [prev] | [next] | [standalone]


#107107

FromLarry Martell <larry.martell@gmail.com>
Date2016-04-16 14:53 -0400
Message-ID<mailman.57.1460832857.6324.python-list@python.org>
In reply to#107105
On Sat, Apr 16, 2016 at 2:18 PM, BartC <bc@freeuk.com> wrote:
> On 16/04/2016 17:58, Larry Martell wrote:
>>
>> On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
>>>
>>> Larry Martell <larry.martell@gmail.com>:
>>>
>>>> I have worked for many companies where you are required to get a clean
>>>> run of pep8 on your code before your pull request will even be
>>>> considered for approval. I don't agree with this at all, as I think it
>>>> makes the code very ugly, especially enforcing the max line length.
>>>
>>>
>>> Agh, I was with you until your last remark.
>>>
>>> A max line length of 79 characters is among the *only* rigorous
>>> principles I judge coding style on.
>>>
>>> It comes with the maxim that one function must be visible at once on the
>>> screen.
>>
>>
>> if we still had 1970's 80 character TTYs that would matter but on my
>> 29" 1920x1080 screen it doesn't.
>
>
> There are reasons why 'broadsheet' newspapers don't have a single wide
> column spanning the entire width of the page, but are divided into multiple
> columns.

Nor do they have a \ at the end of each line with the following line indented.

[toc] | [prev] | [next] | [standalone]


#107109

Fromalex wright <wrightalexw@gmail.com>
Date2016-04-16 15:21 -0400
Message-ID<mailman.59.1460835499.6324.python-list@python.org>
In reply to#107105
We employ a pretty hard limit of 100.  This way I can reliably have 1
module split vertically with a test or configuration file open or 3
separate modules, etc.  I find 80 to be a bit strict, although in the past
I've been in unfortunate environments where it was helpful.  The rest of
PEP8 is largely adhered to wherever possible and it's been wonderful.  When
I first came to the project it had no real standard and was mostly
formatted at the whims of the one dev working on it.  It was a mess.  The
team has grown significantly internationally and a codified standard not
rooted in any of our habits is great.

(I've never replied to this list so I hope I don't goof up.)

On Sat, Apr 16, 2016 at 2:18 PM, BartC <bc@freeuk.com> wrote:

> On 16/04/2016 17:58, Larry Martell wrote:
>
>> On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa <marko@pacujo.net>
>> wrote:
>>
>>> Larry Martell <larry.martell@gmail.com>:
>>>
>>> I have worked for many companies where you are required to get a clean
>>>> run of pep8 on your code before your pull request will even be
>>>> considered for approval. I don't agree with this at all, as I think it
>>>> makes the code very ugly, especially enforcing the max line length.
>>>>
>>>
>>> Agh, I was with you until your last remark.
>>>
>>> A max line length of 79 characters is among the *only* rigorous
>>> principles I judge coding style on.
>>>
>>> It comes with the maxim that one function must be visible at once on the
>>> screen.
>>>
>>
>> if we still had 1970's 80 character TTYs that would matter but on my
>> 29" 1920x1080 screen it doesn't.
>>
>
> There are reasons why 'broadsheet' newspapers don't have a single wide
> column spanning the entire width of the page, but are divided into multiple
> columns.
>
> (But I think 80 columns is a bit limited. Maybe 100 or 132.)
>
> --
> Bartc
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
"On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the
machine wrong figures, will the right answers come out?' I am not able
rightly
to apprehend the kind of confusion of ideas that could provoke such a
question."

-Charles Babbage, 19th century English mathematician, philosopher, inventor
and mechanical engineer who originated the concept of a programmable
computer.

[toc] | [prev] | [next] | [standalone]


#107133

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2016-04-16 19:08 -0400
Message-ID<mailman.77.1460848093.6324.python-list@python.org>
In reply to#107105
On Sat, 16 Apr 2016 19:18:17 +0100, BartC <bc@freeuk.com> declaimed the
following:

>(But I think 80 columns is a bit limited. Maybe 100 or 132.)

	Common topography practice was 2-2.5 alphabets for column width -- or
52-65 characters... On an old 10pitch typewriter, that meant a 6.5" type
line and 1" margins on 8.5" paper. And still falls 15 characters short of
the old Hollerith card (though many languages used to use the last 8 places
for sequence numbering, hence the 72 character per line practice)

	Properly sized, one can take in the entire line with minimal eye motion
(which is one of the points of speed reading classes -- you take in the
entire line without scanning left to right and back..).
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#107104

FromTerry Reedy <tjreedy@udel.edu>
Date2016-04-16 13:25 -0400
Message-ID<mailman.56.1460827581.6324.python-list@python.org>
In reply to#107101
On 4/16/2016 12:58 PM, Larry Martell wrote:
> On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
>> Larry Martell <larry.martell@gmail.com>:
>>
>>> I have worked for many companies where you are required to get a clean
>>> run of pep8 on your code before your pull request will even be
>>> considered for approval. I don't agree with this at all, as I think it
>>> makes the code very ugly, especially enforcing the max line length.
>>
>> Agh, I was with you until your last remark.
>>
>> A max line length of 79 characters is among the *only* rigorous
>> principles I judge coding style on.
>>
>> It comes with the maxim that one function must be visible at once on the
>> screen.
>
> if we still had 1970's 80 character TTYs that would matter but on my
> 29" 1920x1080 screen it doesn't.

It depends on whether one prefers to use the extra width to have long 
lines or side-by-side windows.  I prefer the latter.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#107106

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-04-16 21:33 +0300
Message-ID<87wpnx5rpe.fsf@elektro.pacujo.net>
In reply to#107104
Terry Reedy <tjreedy@udel.edu>:

> On 4/16/2016 12:58 PM, Larry Martell wrote:
>> if we still had 1970's 80 character TTYs that would matter but on my
>> 29" 1920x1080 screen it doesn't.
>
> It depends on whether one prefers to use the extra width to have long
> lines or side-by-side windows.  I prefer the latter.

Precisely. I have better uses for my screen than seeing a mostly white,
ragged right margin.


Marko

[toc] | [prev] | [next] | [standalone]


#107108

FromEthan Furman <ethan@stoneleaf.us>
Date2016-04-16 12:07 -0700
Message-ID<mailman.58.1460833577.6324.python-list@python.org>
In reply to#107101
On 04/16/2016 10:25 AM, Terry Reedy wrote:
> On 4/16/2016 12:58 PM, Larry Martell wrote:
>> On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa wrote:

>>> Larry Martell wrote:

>>>> I have worked for many companies where you are required to get a clean
>>>> run of pep8 on your code before your pull request will even be
>>>> considered for approval. I don't agree with this at all, as I think it
>>>> makes the code very ugly, especially enforcing the max line length.
>>>
>>> Agh, I was with you until your last remark.
>>>
>>> A max line length of 79 characters is among the *only* rigorous
>>> principles I judge coding style on.
>>>
>>> It comes with the maxim that one function must be visible at once on the
>>> screen.
>>
>> if we still had 1970's 80 character TTYs that would matter but on my
>> 29" 1920x1080 screen it doesn't.
>
> It depends on whether one prefers to use the extra width to have long
> lines or side-by-side windows.  I prefer the latter.

Python code windows go in my portrait mode 27" screens (120 chars), 
while xml windows go in landscape mode (220 chars).

Yes, there are many reasons why I don't like xml. :(

--
~Ethan~

[toc] | [prev] | [next] | [standalone]


#107110

FromBen Finney <ben+python@benfinney.id.au>
Date2016-04-17 06:08 +1000
Message-ID<mailman.60.1460837304.6324.python-list@python.org>
In reply to#107101
Larry Martell <larry.martell@gmail.com> writes:

> if we still had 1970's 80 character TTYs that would matter but on my
> 29" 1920x1080 screen it doesn't.

Larry, you've been around long enough to know that's not an argument
against a limited line length for code. It is not about the technology
of your terminal. It's about the technology of the brain reading the
text.

-- 
 \                “Fascism is capitalism plus murder.” —Upton Sinclair |
  `\                                                                   |
_o__)                                                                  |
Ben Finney

[toc] | [prev] | [next] | [standalone]


Page 1 of 8  [1] 2 3 4 5 6 7 8  Next page →

Back to top | Article view | comp.lang.python


csiph-web