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 4 of 15 — ← Prev page 1 2 3 [4] 5 6 … 15  Next page →


#108949

FromJon Ribbens <jon+usenet@unequivocal.co.uk>
Date2016-05-22 16:46 +0000
Message-ID<slrnnk3opm.krr.jon+usenet@wintry.unequivocal.co.uk>
In reply to#108948
On 2016-05-22, Chris Angelico <rosuav@gmail.com> wrote:
> Python's int and float types are both approximations to a
> non-representable type called a "real number".

Sorry, I have to stop you there as the entire premise of your post is
clearly wrong. "int" is not "an approximation of real numbers", it's
a model of the mathematical concept "integers", and it's not an
approximation, and since the long/int unification you can't even
overflow it as I understand things (barring ridiculous situations like
running out of memory).

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


#108950

FromRustom Mody <rustompmody@gmail.com>
Date2016-05-22 10:22 -0700
Message-ID<b199f688-93e9-4834-b232-8bd188215ce0@googlegroups.com>
In reply to#108949
On Sunday, May 22, 2016 at 10:20:11 PM UTC+5:30, Jon Ribbens wrote:
> On 2016-05-22, Chris Angelico wrote:
> > Python's int and float types are both approximations to a
> > non-representable type called a "real number".
> 
> Sorry, I have to stop you there as the entire premise of your post is
> clearly wrong. "int" is not "an approximation of real numbers", it's
> a model of the mathematical concept "integers", and it's not an
> approximation, and since the long/int unification you can't even
> overflow it as I understand things (barring ridiculous situations like
> running out of memory).

Well maybe Chris should have said (or meant to say?)

In math:
ℤ ⊆ ℝ

whereas in programming int and float are disjoint types.

So structurally the (int,float) type pair poorly approximates the 
(ℤ, ℝ) pair of math sets

Doesnt mean I agree with

> we can't perfectly represent real numbers or calculate with them, so we do 
> the best we can

Floats are a grotesque travesty of ℝ
At the least, interval arithmetic can help automatically do the numerical 
analysis for you.
Then there are all kinds of rational approximations like continued fractions
which are better than ℚ
All the way to "computable real numbers"

We're stuck with them because that's the hardware we've got.
Nothing intrinsic or necessary about it

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


#108952

FromRandom832 <random832@fastmail.com>
Date2016-05-22 13:30 -0400
Message-ID<mailman.2.1463938241.20402.python-list@python.org>
In reply to#108949
On Sun, May 22, 2016, at 12:46, Jon Ribbens wrote:
> Sorry, I have to stop you there as the entire premise of your post is
> clearly wrong. "int" is not "an approximation of real numbers", it's
> a model of the mathematical concept "integers",

It is a representation of Z, a subset of R (as is float, technically,
though that particular subset has no nice name like Z and Q) The
operators that apply to it are the operations on R, even operations
under which Z (or even R) is not closed.

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


#108954

FromJon Ribbens <jon+usenet@unequivocal.co.uk>
Date2016-05-22 17:55 +0000
Message-ID<slrnnk3sqn.krr.jon+usenet@wintry.unequivocal.co.uk>
In reply to#108952
On 2016-05-22, Random832 <random832@fastmail.com> wrote:
> On Sun, May 22, 2016, at 12:46, Jon Ribbens wrote:
>> Sorry, I have to stop you there as the entire premise of your post is
>> clearly wrong. "int" is not "an approximation of real numbers", it's
>> a model of the mathematical concept "integers",
>
> It is a representation of Z, a subset of R

Yes, that's what I just said. "Z" is just (an approximation of!)
a symbol that means "the set of integers".

> (as is float, technically, though that particular subset has no nice
> name like Z and Q) The operators that apply to it are the operations
> on R, even operations under which Z (or even R) is not closed.

No, in Python integers are closed under the standard arithmetic
operators (+ - * / % **) - except, since Python 3, for "/", which
is now a special case.

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


#108956

FromRandom832 <random832@fastmail.com>
Date2016-05-22 14:14 -0400
Message-ID<mailman.3.1463940890.20402.python-list@python.org>
In reply to#108954
On Sun, May 22, 2016, at 13:55, Jon Ribbens wrote:
> No, in Python integers are closed under the standard arithmetic
> operators (+ - * / % **)

Z is not closed under standard division, as surely as N isn't closed
under subtraction and R isn't closed under exponentiation. That is a
mathematical fact, not one about any particular language. What you are
saying is that Python 2's "/" is _not_ standard division (you want to
talk about the principle of least surprise...), and is therefore _not_ a
standard arithmetic operation. It's not Euclidean division, either,
since it gives a negative remainder for negative divisors.

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


#108961

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2016-05-22 20:51 +0100
Message-ID<877felub0o.fsf@bsb.me.uk>
In reply to#108954
Jon Ribbens <jon+usenet@unequivocal.co.uk> writes:

<snip>
> No, in Python integers are closed under the standard arithmetic
> operators (+ - * / % **) - except, since Python 3, for "/", which
> is now a special case.

2 ** -1 is 0.5 even in Python 2[*].

I agree with your general point (that floats should not pop up unbidden)
but I don't think you need to exclude the possibly that an operator can
do that.  With perfect hindsight, I think I'd have had the integers
closed under operators +, -, *, //, % and (say) ^, whilst making it
clear that / and ** produce floats.  There's no reason to see this as
being any less explicit that writing 1.0 as a way to make your intent to
use floats explicit.

* Not a Python expert so all I means is that I get 0.5 on my machine and
  I'm assuming that's what Python 2 mandates as the result.

-- 
Ben.

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


#108967

FromJon Ribbens <jon+usenet@unequivocal.co.uk>
Date2016-05-23 00:34 +0000
Message-ID<slrnnk4k87.krr.jon+usenet@wintry.unequivocal.co.uk>
In reply to#108961
On 2016-05-22, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
> Jon Ribbens <jon+usenet@unequivocal.co.uk> writes:
><snip>
>> No, in Python integers are closed under the standard arithmetic
>> operators (+ - * / % **) - except, since Python 3, for "/", which
>> is now a special case.
>
> 2 ** -1 is 0.5 even in Python 2[*].

Haha, excellent, well found. I was wondering if there were any edge
cases I was wrong about. I suppose ideally I would make it so that
2 ** -1 throws an exception or something. But of course this
particular train has left the station a long time ago.

> I agree with your general point (that floats should not pop up unbidden)
> but I don't think you need to exclude the possibly that an operator can
> do that.  With perfect hindsight, I think I'd have had the integers
> closed under operators +, -, *, //, % and (say) ^, whilst making it
> clear that / and ** produce floats.  There's no reason to see this as
> being any less explicit that writing 1.0 as a way to make your intent to
> use floats explicit.

My fundamental point is that floats are surprising, so people should
not be surprised by them arriving unbidden - and most of the time,
there is no need at all for them to turn up unannounced. Making that
occurrence more likely rather than less was a mistake.

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


#108966

FromIan Kelly <ian.g.kelly@gmail.com>
Date2016-05-22 17:04 -0600
Message-ID<mailman.9.1463958294.20402.python-list@python.org>
In reply to#108954
On Sun, May 22, 2016 at 11:55 AM, Jon Ribbens
<jon+usenet@unequivocal.co.uk> wrote:
> On 2016-05-22, Random832 <random832@fastmail.com> wrote:
>> On Sun, May 22, 2016, at 12:46, Jon Ribbens wrote:
>>> Sorry, I have to stop you there as the entire premise of your post is
>>> clearly wrong. "int" is not "an approximation of real numbers", it's
>>> a model of the mathematical concept "integers",
>>
>> It is a representation of Z, a subset of R
>
> Yes, that's what I just said. "Z" is just (an approximation of!)
> a symbol that means "the set of integers".
>
>> (as is float, technically, though that particular subset has no nice
>> name like Z and Q) The operators that apply to it are the operations
>> on R, even operations under which Z (or even R) is not closed.
>
> No, in Python integers are closed under the standard arithmetic
> operators (+ - * / % **) - except, since Python 3, for "/", which
> is now a special case.

If you want Python integers to be closed under division *and* be
mathematically correct then the result of 1 / 2 should be the
multiplicative inverse of 2, which is *undefined* in Z. While that
might be an argument for raising an exception, it's not in any way a
justification of returning 0.

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


#108965

FromSteven D'Aprano <steve@pearwood.info>
Date2016-05-23 08:09 +1000
Message-ID<57422e03$0$1596$c3e8da3$5496439d@news.astraweb.com>
In reply to#108947
On Mon, 23 May 2016 01:52 am, Jon Ribbens wrote:

> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:

>> How is this any better though? Complicated or not, people want to divide
>> 1 by 2 and get 0.5. That is the functional requirement. Furthermore, they
>> want to use the ordinary division symbol / rather than having to import
>> some library or call a function.
> 
> That's a circular argument. You're defining the result as the
> requirement and then saying that proves the result is necessary.
> Clearly, people managed when 1/2 returned 0, and continue to do so
> today in Python 2 and other languages.

I'm not defining the result. 4000+ years of mathematics defines the result.

If you get up off your chair and wander around and ask people other than C
programmers "What's one divide by two?", I am confident that virtually zero
percent will answer "zero".

People only managed when 1/2 returned 0 by *working around the problem*, and
yes, it is a problem. They work around it by explicitly casting values to
float (which, if carelessly done, just introduces new problems), or by
using "from __future__ import division".


>> Having 1/2 return 0 (as Python 2 does by default) doesn't make the
>> language any less complicated. It doesn't avoid the complexity of
>> floats, it merely breaks the principle of least surprise,
> 
> No, it *adheres* to the principle of least surprise. Floats appearing
> out of nowhere is surprising. Python 2's behaviour adhered to the
> principle, and Python 3's breaks it.

The float isn't appearing out of nowhere. It appears because you're
performing a division.

When you call `len("hello world")`, are you shocked that an int appears out
of nowhere? Of course not. That's what len() does.

Why should you be shocked that division returns a fractional quantity?
That's what division does! Divide a cake into two pieces, and you have two
half cakes, not no cake.


>>> That's a trap for those people though - it lulls them into thinking
>>> that they understand what's going on, when in fact they don't,
>>> because they don't understand floats, because almost nobody
>>> understands floats. So they don't understand their program, and
>>> - even worse - they don't know that they don't understand it.
>>
>> And how does forcing them to write 1.0/2 solve that?
> 
> Because it forces them to consciously address the fact that they are
> asking for, and getting, floats, and that floats are not something
> the language is willingly to silently foist upon them.

It does no such thing. Have you met any programmers? It forces them to add
an extraneous .0 to the end of their value, and give it no further thought
until somebody reports a bug that Fraction calculations are silently
coerced to floats, and that Decimal calculations raise an exception. And
then they close the bug report "Will not fix" because it's too hard.

>>> Programming languages should do what they are told, and very little
>>> more.
>>
>> Okay, now I'm confused. How is 1/2 returning 0.5 the language not doing
>> what you've told it to do?
> 
> I didn't ask for floats, I got floats. That's how.

You performed a division. What did you expect, a dict?


>>> They should not wander off on surprising jaunts of their own
>>> invention out of the control of the programmer. It should be possible
>>> to know and understand the language, or at least the subset of it
>>> that you are likely to need for your everyday purposes. Floats are
>>> generally not understood, so they shouldn't be suddenly turning up
>>> un-called for.
>>
>> How are they uncalled for?
> 
> By... not being called for? I must admit I don't entirely understand
> your question.

You performed a division. By definition, this involves returning a
fractional amount, or at least the possibility of returning a fractional
amount. To say that it is "uncalled for" to receive a fractional amount is,
frankly, bizarre.



-- 
Steven

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


#108968

FromJon Ribbens <jon+usenet@unequivocal.co.uk>
Date2016-05-23 00:36 +0000
Message-ID<slrnnk4kau.krr.jon+usenet@wintry.unequivocal.co.uk>
In reply to#108965
On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
> On Mon, 23 May 2016 01:52 am, Jon Ribbens wrote:
>> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
>>> How is this any better though? Complicated or not, people want to divide
>>> 1 by 2 and get 0.5. That is the functional requirement. Furthermore, they
>>> want to use the ordinary division symbol / rather than having to import
>>> some library or call a function.
>> 
>> That's a circular argument. You're defining the result as the
>> requirement and then saying that proves the result is necessary.
>> Clearly, people managed when 1/2 returned 0, and continue to do so
>> today in Python 2 and other languages.
>
> I'm not defining the result. 4000+ years of mathematics defines the result.

OK, I'm bored of you now. You clearly are not willing to imagine
a world beyond your own preconceptions. I am not saying that my view
is right, I'm just saying that yours is not automatically correct.
If you won't even concede that much then this conversation is pointless.

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


#108969

FromChris Angelico <rosuav@gmail.com>
Date2016-05-23 11:01 +1000
Message-ID<mailman.10.1463965305.20402.python-list@python.org>
In reply to#108968
On Mon, May 23, 2016 at 10:36 AM, Jon Ribbens
<jon+usenet@unequivocal.co.uk> wrote:
> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
>> On Mon, 23 May 2016 01:52 am, Jon Ribbens wrote:
>>> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
>>>> How is this any better though? Complicated or not, people want to divide
>>>> 1 by 2 and get 0.5. That is the functional requirement. Furthermore, they
>>>> want to use the ordinary division symbol / rather than having to import
>>>> some library or call a function.
>>>
>>> That's a circular argument. You're defining the result as the
>>> requirement and then saying that proves the result is necessary.
>>> Clearly, people managed when 1/2 returned 0, and continue to do so
>>> today in Python 2 and other languages.
>>
>> I'm not defining the result. 4000+ years of mathematics defines the result.
>
> OK, I'm bored of you now. You clearly are not willing to imagine
> a world beyond your own preconceptions. I am not saying that my view
> is right, I'm just saying that yours is not automatically correct.
> If you won't even concede that much then this conversation is pointless.

The point of arithmetic in software is to do what mathematics defines.
Would you expect 1+2 to return 5? No. Why not? Where was the result
defined?

ChrisA

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


#108970

FromJon Ribbens <jon+usenet@unequivocal.co.uk>
Date2016-05-23 01:00 +0000
Message-ID<slrnnk4lnn.krr.jon+usenet@wintry.unequivocal.co.uk>
In reply to#108969
On 2016-05-23, Chris Angelico <rosuav@gmail.com> wrote:
> On Mon, May 23, 2016 at 10:36 AM, Jon Ribbens
><jon+usenet@unequivocal.co.uk> wrote:
>> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
>>> On Mon, 23 May 2016 01:52 am, Jon Ribbens wrote:
>>>> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
>>>>> How is this any better though? Complicated or not, people want to divide
>>>>> 1 by 2 and get 0.5. That is the functional requirement. Furthermore, they
>>>>> want to use the ordinary division symbol / rather than having to import
>>>>> some library or call a function.
>>>>
>>>> That's a circular argument. You're defining the result as the
>>>> requirement and then saying that proves the result is necessary.
>>>> Clearly, people managed when 1/2 returned 0, and continue to do so
>>>> today in Python 2 and other languages.
>>>
>>> I'm not defining the result. 4000+ years of mathematics defines the result.
>>
>> OK, I'm bored of you now. You clearly are not willing to imagine
>> a world beyond your own preconceptions. I am not saying that my view
>> is right, I'm just saying that yours is not automatically correct.
>> If you won't even concede that much then this conversation is pointless.
>
> The point of arithmetic in software is to do what mathematics defines.
> Would you expect 1+2 to return 5? No. Why not? Where was the result
> defined?

Are you trying to compete with him for the Missing The Point Award?

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


#108972

Frombreamoreboy@gmail.com
Date2016-05-22 18:47 -0700
Message-ID<bb9a3392-1871-4258-a0b8-2f3fa9e82a73@googlegroups.com>
In reply to#108970
On Monday, May 23, 2016 at 2:04:01 AM UTC+1, Jon Ribbens wrote:
> On 2016-05-23, Chris Angelico <rosuav@gmail.com> wrote:
> > On Mon, May 23, 2016 at 10:36 AM, Jon Ribbens
> ><jon+usenet@unequivocal.co.uk> wrote:
> >> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
> >>> On Mon, 23 May 2016 01:52 am, Jon Ribbens wrote:
> >>>> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
> >>>>> How is this any better though? Complicated or not, people want to divide
> >>>>> 1 by 2 and get 0.5. That is the functional requirement. Furthermore, they
> >>>>> want to use the ordinary division symbol / rather than having to import
> >>>>> some library or call a function.
> >>>>
> >>>> That's a circular argument. You're defining the result as the
> >>>> requirement and then saying that proves the result is necessary.
> >>>> Clearly, people managed when 1/2 returned 0, and continue to do so
> >>>> today in Python 2 and other languages.
> >>>
> >>> I'm not defining the result. 4000+ years of mathematics defines the result.
> >>
> >> OK, I'm bored of you now. You clearly are not willing to imagine
> >> a world beyond your own preconceptions. I am not saying that my view
> >> is right, I'm just saying that yours is not automatically correct.
> >> If you won't even concede that much then this conversation is pointless.
> >
> > The point of arithmetic in software is to do what mathematics defines.
> > Would you expect 1+2 to return 5? No. Why not? Where was the result
> > defined?
> 
> Are you trying to compete with him for the Missing The Point Award?

We had the RUE, now we've got the Resident Arithmetic Expert or RAE.  Just what the doctor didn't order.

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


#109002

FromJon Ribbens <jon+usenet@unequivocal.co.uk>
Date2016-05-23 15:35 +0000
Message-ID<slrnnk690u.krr.jon+usenet@wintry.unequivocal.co.uk>
In reply to#108972
On 2016-05-23, breamoreboy@gmail.com <breamoreboy@gmail.com> wrote:
> On Monday, May 23, 2016 at 2:04:01 AM UTC+1, Jon Ribbens wrote:
>> On 2016-05-23, Chris Angelico <rosuav@gmail.com> wrote:
>> > The point of arithmetic in software is to do what mathematics defines.
>> > Would you expect 1+2 to return 5? No. Why not? Where was the result
>> > defined?
>> 
>> Are you trying to compete with him for the Missing The Point Award?
>
> We had the RUE, now we've got the Resident Arithmetic Expert or RAE.
> Just what the doctor didn't order.

Who's that then? Maybe they could chip in with their opinion.

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


#108973

FromMRAB <python@mrabarnett.plus.com>
Date2016-05-23 02:51 +0100
Message-ID<mailman.11.1463968482.20402.python-list@python.org>
In reply to#108970
On 2016-05-23 02:00, Jon Ribbens wrote:
> On 2016-05-23, Chris Angelico <rosuav@gmail.com> wrote:
>> On Mon, May 23, 2016 at 10:36 AM, Jon Ribbens
>><jon+usenet@unequivocal.co.uk> wrote:
>>> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
>>>> On Mon, 23 May 2016 01:52 am, Jon Ribbens wrote:
>>>>> On 2016-05-22, Steven D'Aprano <steve@pearwood.info> wrote:
>>>>>> How is this any better though? Complicated or not, people want to divide
>>>>>> 1 by 2 and get 0.5. That is the functional requirement. Furthermore, they
>>>>>> want to use the ordinary division symbol / rather than having to import
>>>>>> some library or call a function.
>>>>>
>>>>> That's a circular argument. You're defining the result as the
>>>>> requirement and then saying that proves the result is necessary.
>>>>> Clearly, people managed when 1/2 returned 0, and continue to do so
>>>>> today in Python 2 and other languages.
>>>>
>>>> I'm not defining the result. 4000+ years of mathematics defines the result.
>>>
>>> OK, I'm bored of you now. You clearly are not willing to imagine
>>> a world beyond your own preconceptions. I am not saying that my view
>>> is right, I'm just saying that yours is not automatically correct.
>>> If you won't even concede that much then this conversation is pointless.
>>
>> The point of arithmetic in software is to do what mathematics defines.
>> Would you expect 1+2 to return 5? No. Why not? Where was the result
>> defined?
>
> Are you trying to compete with him for the Missing The Point Award?
>
The relevant doc is PEP 238, dating to March 2001, when Python 2.2 was new.

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


#108975

FromBen Finney <ben+python@benfinney.id.au>
Date2016-05-23 14:13 +1000
Message-ID<mailman.12.1463977754.20402.python-list@python.org>
In reply to#108968
Jon Ribbens <jon+usenet@unequivocal.co.uk> writes:

> OK, I'm bored of you now. You clearly are not willing to imagine
> a world beyond your own preconceptions.

Steven has, in the message to which you responded, asked for you to
*describe* this other world you assert exists.

More concretely: Steven is not denying someone might have different
expectations. On the contrary, you've said your expectations differ, and
Steven is *explicitly asking* you to specify those expectations.

And, instead of answering, you give this dismissal. Are your
expectations so hard to describe?

-- 
 \       “It is wrong to think that the task of physics is to find out |
  `\         how nature *is*. Physics concerns what we can *say* about |
_o__)                                             nature…” —Niels Bohr |
Ben Finney

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


#108976

FromRustom Mody <rustompmody@gmail.com>
Date2016-05-22 23:09 -0700
Message-ID<a2867ef8-9f6b-4025-af0a-00fd0d731c89@googlegroups.com>
In reply to#108975
On Monday, May 23, 2016 at 9:59:27 AM UTC+5:30, Ben Finney wrote:
> Jon Ribbens writes:
> 
> > OK, I'm bored of you now. You clearly are not willing to imagine
> > a world beyond your own preconceptions.
> 
> Steven has, in the message to which you responded, asked for you to
> *describe* this other world you assert exists.
> 
> More concretely: Steven is not denying someone might have different
> expectations. On the contrary, you've said your expectations differ, and
> Steven is *explicitly asking* you to specify those expectations.
> 
> And, instead of answering, you give this dismissal. Are your
> expectations so hard to describe?

Steven is making wild and disingenuous statements; to wit:

On Monday, May 23, 2016 at 3:39:19 AM UTC+5:30, Steven D'Aprano wrote:
> I'm not defining the result. 4000+ years of mathematics defines the result.

This is off by on order of magnitude.
Decimal point started with Napier (improving on Stevin): 17th century
OTOH it is plain numbers (ℕ) that have been in use for some 4 millennia.

> 
> If you get up off your chair and wander around and ask people other than C
> programmers "What's one divide by two?", I am confident that virtually zero
> percent will answer "zero".

You forget that we (most of us?) went to school.
My recollections of it -- ok maybe fogged by near 5 decades:

I first learnt something called 'long-division'
In that procedure you take 2 numbers called divisor and dividend
And GET TWO NUMBERS a quotient and a remainder.
[At that point only knew of the numbers we would later call ℤ (or was it ℕ -- 
not sure -- decimal point would come later]

Later (again dont remember order) we were taught
- short division
- decimal numbers
[I mention short division -- put numerator on top of denominator and cancel off
factors -- because the symmetry of numerator:denominator and quotient:remainder
is more apparent there than in long-division]

In any case if learning primacy has any significance, pure integer division
is more basic than decimal number division.

To recapitulate the situation:
Mathematics (mathematicians if you prefer) have a strong attachment to
to two nice properties of operators:

The first is obvious and unarguable -- totality
The second does not have a standard term but is important enough -- I will
call it 'homogeneity'.  By this I mean a type of the form:  t × t → t 

Its nice to have totality because one can avoid case-analysing:
f(x) when x ∈ domain(f)

Its nice to have homogeneity because homogeneous operators can be 
nested/unnested/played-with
ie for ◼ :  t × t → t
x ◼ y ◼ z makes sense this way x ◼ (y ◼ z) or this way (x ◼ y) ◼ z
With non-homogeneous ◼ these may not make sense.


- Choosing ÷ to be total and homogeneous necessitates widening 
  ℤ (or ℕ) to ℚ or ℝ (or something as messy)
- Choosing ÷ to be non-homogeneous means needing to deal with quotients and 
  remainders
  Cant write if (x/4 < 256)...
  have to write 
     quot, rem = x/4   # throw away rem
     if quot < 256: ...


Haskell has (almost) what I learnt at school:

Prelude> let (q,r) = 7 `divMod` 3
Prelude> (q,r)
(2,1)

Replace the strange `divMod` with / and we are back to the behavior I first 
learnt at school


So with some over-simplification:
- the first choice leads to numerical analysis
- the second leads to number theory

To say that one is natural --especially the one that chooses something other 
than natural numbers! --and the other is surprising is nonsense.

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


#108978

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-05-23 09:30 +0300
Message-ID<87oa7x1e1q.fsf@elektro.pacujo.net>
In reply to#108976
Rustom Mody <rustompmody@gmail.com>:

> Haskell has (almost) what I learnt at school:
>
> Prelude> let (q,r) = 7 `divMod` 3
> Prelude> (q,r)
> (2,1)

Python:

   >>> divmod(7, 3)
   (2, 1)

> Replace the strange `divMod` with / and we are back to the behavior I
> first learnt at school

                                                               X
We never used '/' in school for anything. We used 'X : Y' or '---'.
                                                               Y

Anyway, every calculator in the world produces:

   1
   ÷
   2
   =

   ==> 0.5


Marko

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


#108979

FromRustom Mody <rustompmody@gmail.com>
Date2016-05-22 23:46 -0700
Message-ID<9939905d-d482-4256-bcb2-14ad6b343129@googlegroups.com>
In reply to#108978
On Monday, May 23, 2016 at 12:01:08 PM UTC+5:30, Marko Rauhamaa wrote:
> Rustom Mody :
> 
> > Haskell has (almost) what I learnt at school:
> >
> > Prelude> let (q,r) = 7 `divMod` 3
> > Prelude> (q,r)
> > (2,1)
> 
> Python:
> 
>    >>> divmod(7, 3)
>    (2, 1)
> 
> > Replace the strange `divMod` with / and we are back to the behavior I
> > first learnt at school
> 
>                                                                X
> We never used '/' in school for anything. We used 'X : Y' or '---'.
>                                                                Y
> 
> Anyway, every calculator in the world produces:
> 
>    1
>    ÷
>    2
>    =
> 
>    ==> 0.5

Not true:
https://www.youtube.com/watch?v=iynCW9O_x58
[And ive seen such 40 years ago]

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


#108983

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2016-05-23 18:09 +1000
Message-ID<5742bacb$0$1526$c3e8da3$5496439d@news.astraweb.com>
In reply to#108976
On Monday 23 May 2016 16:09, Rustom Mody wrote:

> Steven is making wild and disingenuous statements; to wit:
> 
> On Monday, May 23, 2016 at 3:39:19 AM UTC+5:30, Steven D'Aprano wrote:
>> I'm not defining the result. 4000+ years of mathematics defines the result.
> 
> This is off by on order of magnitude.
> Decimal point started with Napier (improving on Stevin): 17th century
> OTOH it is plain numbers (ℕ) that have been in use for some 4 millennia.

Are you saying that the Egyptians, Babylonians and Greeks didn't know how to 
work with fractions?

http://mathworld.wolfram.com/EgyptianFraction.html

http://nrich.maths.org/2515

Okay, it's not quite 4000 years ago. Sometimes my historical sense of the 
distant past is a tad inaccurate. Shall we say 2000 years instead?


>> If you get up off your chair and wander around and ask people other than C
>> programmers "What's one divide by two?", I am confident that virtually zero
>> percent will answer "zero".
> 
> You forget that we (most of us?) went to school.

Er, why would I forget that? That's the point -- people have learned about 
fractions. I didn't say "go off deep into the Amazonian rainforests, or into 
the New Guinea highlands, and ask innumerate hunter gatherers...".

But even innumerate hunter gatherers will have an understanding that if you 
have one yam which you wish to share between two people, they will each get 
half. Not zero.



-- 
Steve

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


Page 4 of 15 — ← Prev page 1 2 3 [4] 5 6 … 15  Next page →

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


csiph-web