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


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

for / while else doesn't make sense

Started byHerkermer Sherwood <theherk@gmail.com>
First post2016-05-19 09:31 -0700
Last post2016-06-16 11:19 +1000
Articles 20 on this page of 282 — 43 participants

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

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  for / while else doesn't make sense Herkermer Sherwood <theherk@gmail.com> - 2016-05-19 09:31 -0700
    Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-05-19 10:22 -0700
      Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-20 04:02 +1000
      Re: for / while else doesn't make sense theherk@gmail.com - 2016-05-19 11:47 -0700
        Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-19 23:28 +0300
        Re: for / while else doesn't make sense David Jardine <david@jardine.de> - 2016-05-19 21:49 +0200
    Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-20 03:46 +1000
      Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-19 17:55 +0000
        Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-20 10:06 +1000
          Re: for / while else doesn't make sense gst <g.starck@gmail.com> - 2016-05-19 19:02 -0700
            Re: for / while else doesn't make sense Stephen Hansen <me+python@ixokai.io> - 2016-05-19 23:53 -0700
          Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-20 11:55 +0000
            Re: for / while else doesn't make sense Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-20 19:57 -0400
              Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 21:26 +1000
            Re: for / while else doesn't make sense Ethan Furman <ethan@stoneleaf.us> - 2016-05-20 16:58 -0700
              Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-21 00:24 +0000
                Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 13:50 +1000
                  Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 14:01 +1000
                    Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 19:56 +1000
                      Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 20:08 +1000
                        Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 20:55 +1000
                          Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 21:10 +1000
          Re: for / while else doesn't make sense Erik <python@lucidity.plus.com> - 2016-05-21 08:20 +0100
            Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-21 11:37 +0300
            Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 20:39 +1000
              Re: for / while else doesn't make sense Erik <python@lucidity.plus.com> - 2016-05-21 21:48 +0100
                Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-22 12:57 +1000
              Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-05-22 02:55 +0000
          Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 17:29 +1000
        Re: for / while else doesn't make sense Bob Martin <bob.martin@excite.com> - 2016-05-20 07:45 +0100
      Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-20 06:01 +1000
      Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-19 14:11 -0600
      Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-20 06:27 +1000
    Re: for / while else doesn't make sense Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-20 11:51 +1200
      Re: for / while else doesn't make sense Erik <python@lucidity.plus.com> - 2016-05-20 09:09 +0100
      Re: for / while else doesn't make sense Zachary Ware <zachary.ware+pylist@gmail.com> - 2016-05-20 10:59 -0500
      Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-20 12:20 -0700
        Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 08:43 +1000
          Re: for / while else doesn't make sense theherk@gmail.com - 2016-05-20 16:24 -0700
            Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-21 09:03 +0300
              Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 21:26 +1000
                Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-21 07:51 -0600
                Re: for / while else doesn't make sense Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-21 15:20 +0000
          Re: for / while else doesn't make sense Ben Finney <ben+python@benfinney.id.au> - 2016-05-21 10:21 +1000
          Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-21 00:35 +0000
            Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 12:05 +1000
              Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 14:15 +0000
                Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-22 17:58 +0300
                  Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 15:09 +0000
                  Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 08:26 -0700
                  Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-22 13:25 -0400
                    Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 10:34 -0700
                    Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 18:06 +0000
                      Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-22 14:17 -0400
                    Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-23 17:09 +1000
                Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-23 01:19 +1000
                  Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-23 01:32 +1000
                    Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-22 18:50 +0300
                  Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 15:52 +0000
                    Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-23 02:35 +1000
                      Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 16:46 +0000
                        Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 10:22 -0700
                        Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-22 13:30 -0400
                          Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 17:55 +0000
                            Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-22 14:14 -0400
                            Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-22 20:51 +0100
                              Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 00:34 +0000
                            Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-22 17:04 -0600
                    Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-23 08:09 +1000
                      Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 00:36 +0000
                        Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-23 11:01 +1000
                          Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 01:00 +0000
                            Re: for / while else doesn't make sense breamoreboy@gmail.com - 2016-05-22 18:47 -0700
                              Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 15:35 +0000
                            Re: for / while else doesn't make sense MRAB <python@mrabarnett.plus.com> - 2016-05-23 02:51 +0100
                        Re: for / while else doesn't make sense Ben Finney <ben+python@benfinney.id.au> - 2016-05-23 14:13 +1000
                          Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 23:09 -0700
                            Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-23 09:30 +0300
                              Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 23:46 -0700
                            Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-23 18:09 +1000
                              Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 08:14 -0600
                                Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 15:29 +0100
                                  Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 08:49 -0600
                                    Re: for / while else doesn't make sense Pete Forman <petef4+usenet@gmail.com> - 2016-05-23 19:16 +0100
                                      Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 13:24 -0600
                                        Re: for / while else doesn't make sense Pete Forman <petef4+usenet@gmail.com> - 2016-05-23 22:50 +0100
                                          Re: for / while else doesn't make sense Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-24 18:49 +1200
                                            Re: for / while else doesn't make sense Pete Forman <petef4+usenet@gmail.com> - 2016-05-24 19:03 +0100
                                              Re: for / while else doesn't make sense Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-25 18:35 +1200
                                      Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 10:38 +1000
                                  Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 00:57 +1000
                                    Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 01:47 +1000
                                      Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 01:57 +1000
                                    Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 17:51 +0100
                                      Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 02:59 +1000
                                        Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 20:55 +0100
                                          Re: for / while else doesn't make sense Mark Dickinson <mdickinson@enthought.com> - 2016-05-23 20:17 +0000
                                            Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 22:01 +0100
                                            Numerical methods [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-24 10:57 +1000
                                  Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-23 08:30 -0700
                                    Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 10:02 -0600
                                    Re: for / while else doesn't make sense Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-23 20:22 +0000
                                    Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 09:53 -0600
                                      When were real numbers born? (was for / while else doesn't make sense) Rustom Mody <rustompmody@gmail.com> - 2016-05-23 22:02 -0700
                                    Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-23 15:36 -0700
                                      Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 11:05 +1000
                                        Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-05-23 19:19 -0700
                                          META Culture of this place [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-25 02:43 +1000
                                            Re: META Culture of this place [was Re: for / while else doesn't make sense] boB Stepp <robertvstepp@gmail.com> - 2016-05-24 12:19 -0500
                                            Re: META Culture of this place [was Re: for / while else doesn't make sense] Ned Batchelder <ned@nedbatchelder.com> - 2016-05-24 10:44 -0700
                                              Re: META Culture of this place [was Re: for / while else doesn't make sense] Paul Rubin <no.email@nospam.invalid> - 2016-05-24 12:54 -0700
                                        Re: for / while else doesn't make sense Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-24 14:23 +0000
                                        Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-24 10:40 -0700
                                          Re: for / while else doesn't make sense Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-25 18:38 +1200
                                            Extended ASCII [was Re: for / while else doesn't make sense] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-25 17:30 +1000
                                            Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-25 02:10 -0700
                                              Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-25 20:19 +1000
                                                Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Chris Angelico <rosuav@gmail.com> - 2016-05-25 20:30 +1000
                                                Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Erik <python@lucidity.plus.com> - 2016-05-25 22:03 +0100
                                                  Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-26 10:21 +0300
                                                    Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Rustom Mody <rustompmody@gmail.com> - 2016-05-26 00:44 -0700
                                                    Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-26 12:11 +0300
                                                      Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Chris Angelico <rosuav@gmail.com> - 2016-05-26 19:20 +1000
                                                    Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Erik <python@lucidity.plus.com> - 2016-05-26 21:54 +0100
                                                      Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-27 08:03 +0300
                                                Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-25 21:28 -0400
                                                Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Erik <python@lucidity.plus.com> - 2016-05-26 09:11 +0100
                                                  Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-26 12:20 +0300
                                                    Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Erik <python@lucidity.plus.com> - 2016-05-26 21:29 +0100
                                                      Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-27 00:12 +0300
                                                        Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-27 13:35 +1000
                                                          Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-27 09:10 +0300
                                                            Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-27 16:47 +1000
                                                              Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-27 10:04 +0300
                                                                Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-27 19:56 +1000
                                                                  Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Random832 <random832@fastmail.com> - 2016-05-27 09:51 -0400
                                                                    Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Rustom Mody <rustompmody@gmail.com> - 2016-05-27 08:53 -0700
                                                                      Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Random832 <random832@fastmail.com> - 2016-05-27 12:09 -0400
                                                                        Coding systems are political (was Exended ASCII and code pages) Rustom Mody <rustompmody@gmail.com> - 2016-05-27 21:46 -0700
                                                                          Re: Coding systems are political (was Exended ASCII and code pages) wxjmfauth@gmail.com - 2016-05-28 08:16 -0700
                                                                            Re: Coding systems are political (was Exended ASCII and code pages) Ned Batchelder <ned@nedbatchelder.com> - 2016-05-28 08:50 -0700
                                                                          Re: Coding systems are political (was Exended ASCII and code pages) Random832 <random832@fastmail.com> - 2016-05-28 14:05 -0400
                                                                          Re: Coding systems are political (was Exended ASCII and code pages) Steven D'Aprano <steve@pearwood.info> - 2016-05-29 15:37 +1000
                                                                            Re: Coding systems are political (was Exended ASCII and code pages) Rustom Mody <rustompmody@gmail.com> - 2016-05-28 23:12 -0700
                                                                              Re: Coding systems are political (was Exended ASCII and code pages) Terry Reedy <tjreedy@udel.edu> - 2016-05-29 14:46 -0400
                                                                                Re: Coding systems are political (was Exended ASCII and code pages) Christian Gollwitzer <auriocus@gmx.de> - 2016-05-29 22:29 +0200
                                                                                Re: Coding systems are political (was Exended ASCII and code pages) wxjmfauth@gmail.com - 2016-05-30 06:35 -0700
                                                                                Re: Coding systems are political (was Exended ASCII and code pages) Rustom Mody <rustompmody@gmail.com> - 2016-06-04 20:54 -0700
                                                                            Re: Coding systems are political (was Exended ASCII and code pages) alister <alister.ware@ntlworld.com> - 2016-05-29 06:19 +0000
                                                                            Re: Coding systems are political (was Exended ASCII and code pages) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-29 20:54 +1200
                                                                              Re: Coding systems are political (was Exended ASCII and code pages) Marko Rauhamaa <marko@pacujo.net> - 2016-05-29 12:56 +0300
                                                                            Re: Coding systems are political (was Exended ASCII and code pages) wxjmfauth@gmail.com - 2016-05-30 09:11 -0700
                                                                      Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Chris Angelico <rosuav@gmail.com> - 2016-05-28 02:16 +1000
                                                                      Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-28 18:54 +1000
                                                                    Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-27 22:03 +0300
                                                                      Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Rustom Mody <rustompmody@gmail.com> - 2016-05-27 21:23 -0700
                                                  Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Rustom Mody <rustompmody@gmail.com> - 2016-05-26 03:39 -0700
                                                Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-26 07:07 -0400
                                              Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-25 13:47 +0300
                                                Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-25 05:19 -0700
                                                Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-25 22:49 -0700
                                                  Re: for / while else doesn't make sense Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-26 09:54 +0300
                                                    Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-26 00:44 -0700
                                                    Re: for / while else doesn't make sense wxjmfauth@gmail.com - 2016-05-26 00:52 -0700
                                                  Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-26 12:05 +0300
                                                    Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-29 14:41 -0400
                                                      Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-29 22:01 +0300
                                    Re: for / while else doesn't make sense Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-23 20:07 -0400
                                    Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 10:11 +1000
                                  Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 02:59 +1000
                                    Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 17:09 +0000
                                      Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 03:33 +1000
                                        Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 17:57 +0000
                                          Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 04:14 +1000
                                      Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-23 13:44 -0400
                                      Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 11:52 -0600
                                      Re: for / while else doesn't make sense Alan Evangelista <alanoe@linux.vnet.ibm.com> - 2016-05-23 15:06 -0300
                                      Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 12:15 +1000
                                        Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-24 10:54 +0000
                                          Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-25 03:44 +1000
                                            Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-25 03:49 +1000
                                            Re: for / while else doesn't make sense MRAB <python@mrabarnett.plus.com> - 2016-05-24 19:57 +0100
                                            Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-24 20:10 +0000
                                    Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 20:29 +0100
                        Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-23 18:33 +1000
          Re: for / while else doesn't make sense Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-21 02:17 +0000
          Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-20 18:23 -0700
          Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 12:31 +1000
          Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-20 20:47 -0700
        Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-20 22:18 -0700
          Education [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-21 20:05 +1000
            Re: Education [was Re: for / while else doesn't make sense] Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-21 08:51 -0700
              Re: Education [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-21 20:08 +0300
                Re: Education [was Re: for / while else doesn't make sense] Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-05-23 16:44 +0000
    Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-01 16:39 -0700
      Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-02 13:44 +1000
      Re: for / while else doesn't make sense Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-06-02 20:09 +0000
        Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-02 14:46 -0600
        Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-02 21:52 +0100
          Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-02 18:05 -0700
            Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-03 10:23 +0100
          Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-02 19:47 -0700
            Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-03 10:32 +0100
              Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 09:22 -0700
                Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-04 12:20 +1000
                  Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 20:41 -0700
                    Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-04 19:27 +1000
                      Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-04 20:20 -0700
                Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-04 13:55 +0100
        Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-02 18:08 -0700
          Re: for / while else doesn't make sense Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-06-03 15:52 +0000
            Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 09:24 -0700
              Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-04 13:00 +1000
                Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 20:43 -0700
                  Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-06-04 04:37 -0700
                    Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-04 20:29 -0700
                      Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-05 16:35 +1000
                      Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-06-05 04:29 -0700
                        Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-05 14:43 +0300
                          Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-06 17:51 -0700
                            Re: for / while else doesn't make sense Dan Sommers <dan@tombstonezero.net> - 2016-06-07 03:34 +0000
                              Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 00:53 -0700
                                Re: for / while else doesn't make sense Dan Sommers <dan@tombstonezero.net> - 2016-06-07 12:27 +0000
                                  Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 14:57 -0700
                            Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-06 22:35 -0600
                              Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 00:52 -0700
                                Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-07 11:00 +0300
                                  Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 15:07 -0700
                                    Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-06-07 17:31 -0700
                                      Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 18:25 -0700
                                      Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 18:29 -0700
                                        Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-06-07 18:40 -0700
                                        Re: for / while else doesn't make sense breamoreboy@gmail.com - 2016-06-07 20:45 -0700
                                    Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-08 08:24 +0300
                                Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-07 18:36 +1000
                                Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-07 05:52 -0600
                                  Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 14:58 -0700
                                    Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-08 01:06 +0300
                                      Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 15:08 -0700
                                        Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-08 08:27 +0300
                                          Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-08 17:34 -0700
                                            Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-09 18:19 +1000
                                    Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-07 17:11 -0600
                          Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-06 17:53 -0700
      Re: for / while else doesn't make sense Ethan Furman <ethan@stoneleaf.us> - 2016-06-07 21:13 -0700
    Re: for / while else doesn't make sense pavlovevidence@gmail.com - 2016-06-12 00:01 -0700
      AttributeError into a bloc try-except AttributeError Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2016-06-12 09:20 +0200
      Re: AttributeError into a bloc try-except AttributeError Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2016-06-12 10:30 +0200
      Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-12 20:06 +1000
        Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-06-12 18:44 +0000
          Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-13 12:12 +1000
            Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-12 20:46 -0700
            Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-06-13 23:45 +0000
              Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-14 12:43 +1000
                Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-06-14 04:37 +0000
                Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-14 08:33 -0700
                  Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-14 16:27 -0700
                    Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-14 18:29 -0700
                  Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-15 13:12 +1000
                    Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-14 20:38 -0700
                    Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 04:19 -0700
                      Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-15 13:27 +0100
                        Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 05:44 -0700
                      Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-06-15 09:51 -0400
                        Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 07:20 -0700
                          Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-06-15 11:54 -0400
                            Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 10:03 -0700
                              Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-15 18:27 +0100
                              Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-16 11:40 +1000
                          Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-06-15 17:18 +0000
                          Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-06-15 13:41 -0400
                        Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 07:31 -0700
                          Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-15 19:59 -0700
                        Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-15 19:54 -0700
                          What is structured programming (was for/while else doesn't make sense) Rustom Mody <rustompmody@gmail.com> - 2016-06-15 22:48 -0700
                            Re: What is structured programming (was for/while else doesn't make sense) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-15 22:57 -0700
                              Re: What is structured programming (was for/while else doesn't make sense) Rustom Mody <rustompmody@gmail.com> - 2016-06-16 04:12 -0700
                                Re: What is structured programming (was for/while else doesn't make sense) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-16 18:53 -0700
                                  Re: What is structured programming (was for/while else doesn't make sense) Rustom Mody <rustompmody@gmail.com> - 2016-06-17 09:32 -0700
                                    Re: What is structured programming (was for/while else doesn't make sense) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-17 16:07 -0700
                      Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-06-15 23:56 +1000
                      Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-16 11:19 +1000

Page 12 of 15 — ← Prev page 1 … 10 11 [12] 13 14 15  Next page →


#109602

FromDan Sommers <dan@tombstonezero.net>
Date2016-06-07 03:34 +0000
Message-ID<nj5fc2$35m$1@dont-email.me>
In reply to#109599
On Mon, 06 Jun 2016 17:51:24 -0700, Lawrence D’Oliveiro wrote:

> It is nice to have a common, versatile looping form which can be
> arranged in different ways to suit the problem at hand. That’s why I
> like the C-style for-statement.

[example snipped]

I used to write a lot of assembly code, for a lot of different CPUs, and
they all had a common, versatile looping form which could be arranged in
different ways to suit the problem at hand.  On most chips, it was (and
still is) called JMP.  The trouble began with multiple conditional
branching, call stack maintenance, and those other higher level
abstractions that made my assembly code so hard to follow.  Why on Earth
would I use something so complicated as a DJNZ instruction when a
common, versatile sequence of decrement, test, and branch-on-not-zero
instructions was available?  And who needed a C-level for statment, let
alone local variables and a language-runtime-maintained function call
stack when I had a handful of common, versatile CPU registers?

http://www.catb.org/jargon/html/story-of-mel.html

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


#109611

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-07 00:53 -0700
Message-ID<ef1be856-ba23-4702-b66d-f80fbcdbd22c@googlegroups.com>
In reply to#109602
On Tuesday, June 7, 2016 at 3:34:39 PM UTC+12, Dan Sommers wrote:

> I used to write a lot of assembly code, for a lot of different CPUs, and
> they all had a common, versatile looping form which could be arranged in
> different ways to suit the problem at hand.  On most chips, it was (and
> still is) called JMP.  The trouble began with multiple conditional
> branching, call stack maintenance, and those other higher level
> abstractions that made my assembly code so hard to follow.

You’ll notice I don’t use gotos in my code.

Next red-herring example, please...

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


#109623

FromDan Sommers <dan@tombstonezero.net>
Date2016-06-07 12:27 +0000
Message-ID<nj6ek5$3p1$1@dont-email.me>
In reply to#109611
On Tue, 07 Jun 2016 00:53:31 -0700, Lawrence D’Oliveiro wrote:

> On Tuesday, June 7, 2016 at 3:34:39 PM UTC+12, Dan Sommers wrote:
> 
>> I used to write a lot of assembly code, for a lot of different CPUs, and
>> they all had a common, versatile looping form which could be arranged in
>> different ways to suit the problem at hand.  On most chips, it was (and
>> still is) called JMP.  The trouble began with multiple conditional
>> branching, call stack maintenance, and those other higher level
>> abstractions that made my assembly code so hard to follow.
> 
> You’ll notice I don’t use gotos in my code.

I notice plenty of break statements scattered throughout your loop
bodies.  Mixing the loop's exit conditions in with the logic is equally
unstructured.

> Next red-herring example, please...

I didn't say anything about a red-herring.  Please stick to the topic at
hand.

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


#109634

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-07 14:57 -0700
Message-ID<d550a22c-3350-4d81-8866-cc9d5d73dd99@googlegroups.com>
In reply to#109623
On Wednesday, June 8, 2016 at 12:28:02 AM UTC+12, Dan Sommers wrote:
> I notice plenty of break statements scattered throughout your loop
> bodies.  Mixing the loop's exit conditions in with the logic is equally
> unstructured.

Is this the old “structured-programming-is-mathematically-equivalent-to-gotos” red herring again?

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


#109603

FromIan Kelly <ian.g.kelly@gmail.com>
Date2016-06-06 22:35 -0600
Message-ID<mailman.50.1465274181.2306.python-list@python.org>
In reply to#109599
On Mon, Jun 6, 2016 at 6:51 PM, Lawrence D’Oliveiro
<lawrencedo99@gmail.com> wrote:
> On Sunday, June 5, 2016 at 11:43:20 PM UTC+12, Marko Rauhamaa wrote:
>> I often experiment with different loop constructs to find the one most
>> pleasing to the eye. Working directly off iterators is quite rare but a
>> while-vs-for consideration is frequent. Also, should the stepping part
>> be in the beginning, middle or end of the loop body?
>
> It is nice to have a common, versatile looping form which can be arranged in different ways to suit the problem at hand. That’s why I like the C-style for-statement.
>
> Here’s another example <https://github.com/ldo/ipy_magics/blob/master/rman_magic.py>, for the consideration of those who don’t seem too familiar with looping:

A 500-line function? Yikes, what an eyesore. When you have to include
#end comments in order to visually match things up, that should be a
smell that your code is excessively complex. It took me a lot of
scrolling up and down just to figure out what the scopes of the
variables were.

>     while True :
>         while True :
>             line = next(input_line, None)
>             if line != None :
>                 if len(include_stack) == 0 :
>                     linenr += 1
>                 #end if
>                 break
>             #end if
>             if len(include_stack) == 0 :
>                 break
>             input_line = include_stack.pop()
>         #end while
>         if line == None or ... line contains something special ... :
>             ...
>             if line == None :
>                 break
>             ... process special line ...
>             ... replace with None to indicate it’s been processed ...
>         #end if
>         if line != None :
>             ... process regular line ...
>         #end if
>     #end while

    def generate_lines():
        nonlocal input_line
        while True:
            try:
                # Note input_line appears to be an iterator, not a string
                # as suggested by the name.
                yield next(input_line)
            except StopIteration:
                if include_stack:
                    input_line = include_stack.pop()
                else:
                    return

    for line in generate_lines():
        if not include_stack:
            linenr += 1
        if ... line contains something special ...:
            ... process special line ...
        else:
            ... process regular line ...

Much simpler than the nested while loop hell above, and not a single
break needed (if you don't count the return, that is; in any case each
loop has a single exit point). I'd be tempted to refactor input_line
and include_stack into some sort of input context class and make
generate_lines a method of the class in order to avoid having those
variables be (effectively) global, but my goal was to keep this as
close to the original in design as possible.

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


#109610

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-07 00:52 -0700
Message-ID<1da21ea9-cfa8-4fae-960c-e753c9cc185e@googlegroups.com>
In reply to#109603
On Tuesday, June 7, 2016 at 4:36:37 PM UTC+12, Ian wrote:
> A 500-line function? Yikes, what an eyesore. When you have to include
> #end comments in order to visually match things up, that should be a
> smell that your code is excessively complex.

Feel free to come up with a simpler version.

>     def generate_lines():
>         nonlocal input_line
>         while True:
>             try:
>                 # Note input_line appears to be an iterator, not a string
>                 # as suggested by the name.
>                 yield next(input_line)
>             except StopIteration:
>                 if include_stack:
>                     input_line = include_stack.pop()
>                 else:
>                     return
> 
>     for line in generate_lines():
>         if not include_stack:
>             linenr += 1
>         if ... line contains something special ...:
>             ... process special line ...
>         else:
>             ... process regular line ...

Wow, that’s only twice the length of the code you’re replacing. Well done.

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


#109613

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-06-07 11:00 +0300
Message-ID<871t49mnse.fsf@elektro.pacujo.net>
In reply to#109610
Lawrence D’Oliveiro <lawrencedo99@gmail.com>:

> On Tuesday, June 7, 2016 at 4:36:37 PM UTC+12, Ian wrote:
>> A 500-line function? Yikes, what an eyesore. When you have to include
>> #end comments in order to visually match things up, that should be a
>> smell that your code is excessively complex.
>
> [...]
>
> Wow, that’s only twice the length of the code you’re replacing. Well
> done.

I understand you are hurt when your code is criticized bluntly. However,
you *did* stick your head out.

I, too, insist that every function/method must be visible at once in the
editor window.


Marko

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


#109637

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-07 15:07 -0700
Message-ID<64698d39-4a55-45f2-a7a1-1755eac44ed7@googlegroups.com>
In reply to#109613
On Tuesday, June 7, 2016 at 8:00:31 PM UTC+12, Marko Rauhamaa wrote:
> I understand you are hurt when your code is criticized bluntly. However,
> you *did* stick your head out.

Don’t worry, I am not the thin-skinned type.

> I, too, insist that every function/method must be visible at once in the
> editor window.

From subprocess.py in the Python 3.5 distribution:

    if _mswindows:
        #
        # Windows methods
        #
        def _get_handles(self, stdin, stdout, stderr):
            """Construct and return tuple with IO objects:
            p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
            """
            if stdin is None and stdout is None and stderr is None:
                return (-1, -1, -1, -1, -1, -1)

            p2cread, p2cwrite = -1, -1
            c2pread, c2pwrite = -1, -1
            errread, errwrite = -1, -1

            if stdin is None:
                p2cread = _winapi.GetStdHandle(_winapi.STD_INPUT_HANDLE)
                if p2cread is None:
                    p2cread, _ = _winapi.CreatePipe(None, 0)
                    p2cread = Handle(p2cread)
                    _winapi.CloseHandle(_)
            elif stdin == PIPE:
                p2cread, p2cwrite = _winapi.CreatePipe(None, 0)
                p2cread, p2cwrite = Handle(p2cread), Handle(p2cwrite)
            elif stdin == DEVNULL:
                p2cread = msvcrt.get_osfhandle(self._get_devnull())
            elif isinstance(stdin, int):
                p2cread = msvcrt.get_osfhandle(stdin)
            else:
                # Assuming file-like object
                p2cread = msvcrt.get_osfhandle(stdin.fileno())
            p2cread = self._make_inheritable(p2cread)

            if stdout is None:
                c2pwrite = _winapi.GetStdHandle(_winapi.STD_OUTPUT_HANDLE)
                if c2pwrite is None:
                    _, c2pwrite = _winapi.CreatePipe(None, 0)
                    c2pwrite = Handle(c2pwrite)
                    _winapi.CloseHandle(_)
            elif stdout == PIPE:
                c2pread, c2pwrite = _winapi.CreatePipe(None, 0)
                c2pread, c2pwrite = Handle(c2pread), Handle(c2pwrite)
            elif stdout == DEVNULL:
                c2pwrite = msvcrt.get_osfhandle(self._get_devnull())
            elif isinstance(stdout, int):
                c2pwrite = msvcrt.get_osfhandle(stdout)
            else:
                # Assuming file-like object
                c2pwrite = msvcrt.get_osfhandle(stdout.fileno())
            c2pwrite = self._make_inheritable(c2pwrite)

            if stderr is None:
                errwrite = _winapi.GetStdHandle(_winapi.STD_ERROR_HANDLE)
                if errwrite is None:
                    _, errwrite = _winapi.CreatePipe(None, 0)
                    errwrite = Handle(errwrite)
                    _winapi.CloseHandle(_)
            elif stderr == PIPE:
                errread, errwrite = _winapi.CreatePipe(None, 0)
                errread, errwrite = Handle(errread), Handle(errwrite)
            elif stderr == STDOUT:
                errwrite = c2pwrite
            elif stderr == DEVNULL:
                errwrite = msvcrt.get_osfhandle(self._get_devnull())
            elif isinstance(stderr, int):
                errwrite = msvcrt.get_osfhandle(stderr)
            else:
                # Assuming file-like object
                errwrite = msvcrt.get_osfhandle(stderr.fileno())
            errwrite = self._make_inheritable(errwrite)

            return (p2cread, p2cwrite,
                    c2pread, c2pwrite,
                    errread, errwrite)

Is that “visible at once” in your editor window?

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


#109643

FromNed Batchelder <ned@nedbatchelder.com>
Date2016-06-07 17:31 -0700
Message-ID<435147d0-ae1f-4095-a49c-1d032278179f@googlegroups.com>
In reply to#109637
On Tuesday, June 7, 2016 at 6:07:23 PM UTC-4, Lawrence D’Oliveiro wrote:
> On Tuesday, June 7, 2016 at 8:00:31 PM UTC+12, Marko Rauhamaa wrote:
> > I understand you are hurt when your code is criticized bluntly. However,
> > you *did* stick your head out.
> 
> Don’t worry, I am not the thin-skinned type.
> 
> > I, too, insist that every function/method must be visible at once in the
> > editor window.
> 
> From subprocess.py in the Python 3.5 distribution:
> 
>     if _mswindows:
>         #
>         # Windows methods
>         #
>         def _get_handles(self, stdin, stdout, stderr):
>             """Construct and return tuple with IO objects:
> 
>             ... 8< snip 8< ...
> 
>             errwrite = self._make_inheritable(errwrite)
> 
>             return (p2cread, p2cwrite,
>                     c2pread, c2pwrite,
>                     errread, errwrite)
> 
> Is that “visible at once” in your editor window?

Lawrence, Marko didn't write that function. Marko didn't claim that all
functions fit in a window, just that he wants his to.

Lawrence writes code in an unusual style, not a style I would write in,
but we aren't going to be able to change his mind.  It seems like this 
discussion has gone beyond the productive stage.  We aren't going to 
come to consensus on coding style.

--Ned.

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


#109646

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-07 18:25 -0700
Message-ID<c8b08fd0-6fa0-4918-a087-ccaed824184b@googlegroups.com>
In reply to#109643
On Wednesday, June 8, 2016 at 12:32:01 PM UTC+12, Ned Batchelder wrote:
> On Tuesday, June 7, 2016 at 6:07:23 PM UTC-4, Lawrence D’Oliveiro wrote:
> > On Tuesday, June 7, 2016 at 8:00:31 PM UTC+12, Marko Rauhamaa wrote:
> > > I understand you are hurt when your code is criticized bluntly. However,
> > > you *did* stick your head out.
> > 
> > Don’t worry, I am not the thin-skinned type.
> > 
> > > I, too, insist that every function/method must be visible at once in the
> > > editor window.
> > 
> > From subprocess.py in the Python 3.5 distribution:
> > 
> >     if _mswindows:
> >         #
> >         # Windows methods
> >         #
> >         def _get_handles(self, stdin, stdout, stderr):
> >             """Construct and return tuple with IO objects:
> > 
> >             ... 8< snip 8< ...
> > 
> >             errwrite = self._make_inheritable(errwrite)
> > 
> >             return (p2cread, p2cwrite,
> >                     c2pread, c2pwrite,
> >                     errread, errwrite)
> > 
> > Is that “visible at once” in your editor window?
> 
> Lawrence, Marko didn't write that function. Marko didn't claim that all
> functions fit in a window, just that he wants his to.

Given that he was (presumably) commenting on my code, naturally I understood his statement to apply to code that he had not written.

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


#109647

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-07 18:29 -0700
Message-ID<7fb81ccb-f80b-4e7c-b9e7-40923ec9f60c@googlegroups.com>
In reply to#109643
On Wednesday, June 8, 2016 at 12:32:01 PM UTC+12, Ned Batchelder wrote:

> Lawrence writes code in an unusual style...

“Unusual” I can deal with. But when some people react with outrage, then it becomes clear they view my code as a personal attack.

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


#109648

FromNed Batchelder <ned@nedbatchelder.com>
Date2016-06-07 18:40 -0700
Message-ID<df836651-e229-4624-9449-e970a4b90126@googlegroups.com>
In reply to#109647
On Tuesday, June 7, 2016 at 9:29:59 PM UTC-4, Lawrence D’Oliveiro wrote:
> On Wednesday, June 8, 2016 at 12:32:01 PM UTC+12, Ned Batchelder wrote:
> 
> > Lawrence writes code in an unusual style...
> 
> “Unusual” I can deal with. But when some people react with outrage, then it becomes clear they view my code as a personal attack.

This is why we should drop it.  It doesn't seem like people are trying to
understand each other, just score points and prove each other wrong. That
isn't going to lead anywhere good.

--Ned.

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


#109652

Frombreamoreboy@gmail.com
Date2016-06-07 20:45 -0700
Message-ID<bea46596-2419-4bb4-b9c3-d22c019454f0@googlegroups.com>
In reply to#109647
On Wednesday, June 8, 2016 at 2:29:59 AM UTC+1, Lawrence D’Oliveiro wrote:
> On Wednesday, June 8, 2016 at 12:32:01 PM UTC+12, Ned Batchelder wrote:
> 
> > Lawrence writes code in an unusual style...
> 
> “Unusual” I can deal with. But when some people react with outrage, then it becomes clear they view my code as a personal attack.

I don't see it as unusual, I just see complete shit, which matches perfectly with the crap that you've been spewing throughout this thread.  Welcome to my Dream team.

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


#109655

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-06-08 08:24 +0300
Message-ID<87h9d445ja.fsf@elektro.pacujo.net>
In reply to#109637
Lawrence D’Oliveiro <lawrencedo99@gmail.com>:

> On Tuesday, June 7, 2016 at 8:00:31 PM UTC+12, Marko Rauhamaa wrote:
>> I, too, insist that every function/method must be visible at once in the
>> editor window.
>
> From subprocess.py in the Python 3.5 distribution:
> [...]
> Is that “visible at once” in your editor window?

At home, no; at work, yes.

Anyway, I didn't write that piece of code so my insisting doesn't affect
it one way or another.


Marko

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


#109614

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2016-06-07 18:36 +1000
Message-ID<575687ac$0$2839$c3e8da3$76491128@news.astraweb.com>
In reply to#109610
On Tuesday 07 June 2016 17:52, Lawrence D’Oliveiro wrote:

> On Tuesday, June 7, 2016 at 4:36:37 PM UTC+12, Ian wrote:
>> A 500-line function? Yikes, what an eyesore. When you have to include
>> #end comments in order to visually match things up, that should be a
>> smell that your code is excessively complex.
> 
> Feel free to come up with a simpler version.

If I could work out what your convoluted version is supposed to do, I might 
give it a try.

[...]

>>     def generate_lines():
>>         nonlocal input_line
[snip code]

> Wow, that’s only twice the length of the code you’re replacing. Well done.

I count 18 lines in your version using while loops, excluding comments, but 
including placeholder ... lines, compared to 17 lines in Ian's version. How do 
you get "twice the length"?

Ian's version is also much simpler: there are no breaks and no variables being 
assigned to None so you can detect the end of the loop, and only three `if`s 
instead of six in your version. That makes Ian's objectively less complex than 
your example, assuming it does the same thing. (Although I'm a bit dubious 
about the use of nonlocal.)



-- 
Steve

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


#109621

FromIan Kelly <ian.g.kelly@gmail.com>
Date2016-06-07 05:52 -0600
Message-ID<mailman.54.1465300411.2306.python-list@python.org>
In reply to#109610
On Tue, Jun 7, 2016 at 1:52 AM, Lawrence D’Oliveiro
<lawrencedo99@gmail.com> wrote:
> Wow, that’s only twice the length of the code you’re replacing. Well done.

Huh? The example that you posted was 17 lines, excluding comments. My
replacement code is 17 lines, excluding comments. Where are you
getting "twice the length" from?

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


#109635

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-07 14:58 -0700
Message-ID<4a643983-c64e-483a-8e23-3c1485b89475@googlegroups.com>
In reply to#109621
On Tuesday, June 7, 2016 at 11:53:46 PM UTC+12, Ian wrote:
> On Tue, Jun 7, 2016 at 1:52 AM, Lawrence D’Oliveiro wrote:

>> Wow, that’s only twice the length of the code you’re replacing. Well done.
> 
> Huh? The example that you posted was 17 lines, excluding comments. My
> replacement code is 17 lines, excluding comments. Where are you
> getting "twice the length" from?

Maybe not twice. But your code for dealing with the include stack was 16 lines, as opposed to 13 in mine.

While elsewhere, you were criticizing my code for already being so terribly large...

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


#109636

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-06-08 01:06 +0300
Message-ID<87shwo4ps2.fsf@elektro.pacujo.net>
In reply to#109635
Lawrence D’Oliveiro <lawrencedo99@gmail.com>:
> While elsewhere, you were criticizing my code for already being so
> terribly large...

Code can be large, only no function should be longer than ~70 lines or
wider than 79 columns. If your function grows above that limit, you
should refactor it and break it into multiple subroutines.


Marko

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


#109638

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-07 15:08 -0700
Message-ID<82e4fddc-5bf0-4b94-be07-7b5a24967e48@googlegroups.com>
In reply to#109636
On Wednesday, June 8, 2016 at 10:07:05 AM UTC+12, Marko Rauhamaa wrote:
> Lawrence D’Oliveiro:

>> While elsewhere, you were criticizing my code for already being so
>> terribly large...
> 
> Code can be large, only no function should be longer than ~70 lines or
> wider than 79 columns. If your function grows above that limit, you
> should refactor it and break it into multiple subroutines.

It already had lots of subfunctions, in case you hadn’t noticed...

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


#109656

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-06-08 08:27 +0300
Message-ID<87d1ns45ds.fsf@elektro.pacujo.net>
In reply to#109638
Lawrence D’Oliveiro <lawrencedo99@gmail.com>:

> On Wednesday, June 8, 2016 at 10:07:05 AM UTC+12, Marko Rauhamaa wrote:
>> Lawrence D’Oliveiro:
>
>>> While elsewhere, you were criticizing my code for already being so
>>> terribly large...
>> 
>> Code can be large, only no function should be longer than ~70 lines
>> or wider than 79 columns. If your function grows above that limit,
>> you should refactor it and break it into multiple subroutines.
>
> It already had lots of subfunctions, in case you hadn’t noticed...

I didn't take a look at your code. Someone mentioned you had a 500-line
function.


Marko

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


Page 12 of 15 — ← Prev page 1 … 10 11 [12] 13 14 15  Next page →

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


csiph-web