Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #108830 > unrolled thread
| Started by | Herkermer Sherwood <theherk@gmail.com> |
|---|---|
| First post | 2016-05-19 09:31 -0700 |
| Last post | 2016-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.
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 10 of 15 — ← Prev page 1 … 8 9 [10] 11 12 … 15 Next page →
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-05-25 03:49 +1000 |
| Message-ID | <mailman.63.1464112145.20402.python-list@python.org> |
| In reply to | #109074 |
On Wed, May 25, 2016 at 3:44 AM, Steven D'Aprano <steve@pearwood.info> wrote: > > If you're just going to automatically gainsay everything I say without even > reading what I say first, well, you're no John Cleese. Yes he is! ChrisA
[toc] | [prev] | [next] | [standalone]
| From | MRAB <python@mrabarnett.plus.com> |
|---|---|
| Date | 2016-05-24 19:57 +0100 |
| Message-ID | <mailman.65.1464116234.20402.python-list@python.org> |
| In reply to | #109074 |
On 2016-05-24 18:49, Chris Angelico wrote: > On Wed, May 25, 2016 at 3:44 AM, Steven D'Aprano <steve@pearwood.info> wrote: >> >> If you're just going to automatically gainsay everything I say without even >> reading what I say first, well, you're no John Cleese. > > Yes he is! > He's not John Cleese, he's a very naughty boy. :-)
[toc] | [prev] | [next] | [standalone]
| From | Jon Ribbens <jon+usenet@unequivocal.co.uk> |
|---|---|
| Date | 2016-05-24 20:10 +0000 |
| Message-ID | <slrnnk9dgo.krr.jon+usenet@wintry.unequivocal.co.uk> |
| In reply to | #109074 |
On 2016-05-24, Steven D'Aprano <steve@pearwood.info> wrote: > On Tue, 24 May 2016 08:54 pm, Jon Ribbens wrote: >> On 2016-05-24, Steven D'Aprano <steve@pearwood.info> wrote: >>> On Tue, 24 May 2016 03:09 am, Jon Ribbens wrote: >>>> On 2016-05-23, Steven D'Aprano <steve@pearwood.info> wrote: > [...] >>> In Australia, we have an 11% consumption tax, the GST. I cannot tell you >>> how many times I've needed to add a 1 cent "Rounding" amount on invoices >>> to get the results to work out correctly. >> >> Indeed. Using floats for currency calculations is one of the many >> traps they present, and an excellent example of why their use should >> not be encouraged. > > How do you know the software uses floats? What software? > But worse, you ignored my example where I showed that using integer > arithmetic also generates the same kind of off by one cent errors. Yes, you showed that you can write broken code. Well done. >> I very much doubt that you have any such choice - it will usually >> be specified by the tax regulations. > > This is not a matter about the GST legislation. It is a matter of > mathematics that using integer or fixed point arithmetic is vulnerable to > the same sorts of rounding errors as floating point arithmetic. Except it isn't - floats are far more complicated. >> The correct way to do currency stuff is either integers or Decimal. > > You're repeating my words back at me. I already said that. No, you said the quote that I left in which is still here below: >>> Using integers in this case is not only *harder* than using floats, but >>> it's more likely to go wrong. Because integer division always rounds >>> down, errors accumulate faster than with floats, where calculations will >>> be correctly rounded to minimize the error. If that isn't you saying that currency stuff should be done using floats, then please explain what you did mean, because that's what it looks like you're saying to me. >> You are falling into the float trap again. This is not how you do >> accounting. > > Did you look at the code I showed? I'm not using floats. I'm using > integers, counting in cents. You didn't say you were using anything. You showed some broken sample code that you had deliberately written to give the wrong result, and then said people should use float instead. > If you're just going to automatically gainsay everything I say > without even reading what I say first, well, you're no John Cleese. I did read what you said. Perhaps you should try the same.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-05-23 20:29 +0100 |
| Message-ID | <87iny4r2tc.fsf@bsb.me.uk> |
| In reply to | #109009 |
Steven D'Aprano <steve@pearwood.info> writes: > On Tue, 24 May 2016 12:29 am, Ben Bacarisse wrote: > >> Ian Kelly <ian.g.kelly@gmail.com> writes: >> >>> On Mon, May 23, 2016 at 2:09 AM, Steven D'Aprano >>> <steve+comp.lang.python@pearwood.info> wrote: >>>> 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? >>> >>> Those links give dates of 1650 BC and 1800 BC respectively, so I'd say >>> your initial guess was closer. >> >> Right, but this is to miss the point. Let's say that 4000 years have >> defined 1/3 to be one third, but Python 3 (as do many programming >> languages) defines 1/3 to be something very very very very close to one >> third, and *that* idea is very very very very new! It's unfortunate >> that the example in this thread does not illustrate the main problem of >> shifting to binary floating point, because 1/2 happens to be exactly >> representable. > > That's not really the point. I acknowledge that floats do not represent all > rational numbers (a/b) exactly. Neither do decimal floats -- most school > children will learn that 0.333333333333 is not 1/3 exactly, and anyone who > has used a calculator will experience calculations that give (say) > 0.999999999 or 1.0000000001 instead of 1. Yes, I got that. I'm sure you're aware of the consequences of a floating point representation. > And you know what? *People cope.* Yes, I agree. > For all the weirdness of floating point, for all the rounding errors and > violations of mathematical properties, floating point maths is *still* the > best way to perform numerical calculations for many purposes. Indeed. > In fact, even IEEE-754 arithmetic, which is correctly rounded and therefore > introduces the least possible rounding error, is sometimes "too good" -- > people often turn to GPUs instead of CPUs for less accurate but faster bulk > calculations. Yes, they do. > The point is, most people wouldn't really care that much whether 1/3 > returned a binary 0.3333333333, or decimal 0.3333333333, or an exact > rational fraction 1/3. Most people wouldn't care too much if they got > 32-bits of precision or 64, or 10 decimal places or 18. When cutting (say) > a sheet of paper into three equal pieces, they are unlikely to be able to > measure and cut with an accuracy better than 1/2 of a millimeter, so 15 > decimal places is overkill. I agree here too. Most people cope just fine with floating point. Usenet magnifies the number of people reporting issues (due to testing for equality or using them for currency and so on), but there is almost certainly a silent majority who either just figure it out or understand how to use floats from the get-go. But there is an issue, however small, and it's due, largely, to the fact that people can't see the representation of floats very well. All sorts of things conspire (for the very best of engineering reasons) to make it hard to see what actual value you are holding. Yes, people have been doing arithmetic for thousands of years, but they've usually done it by manipulating the representation themselves. The "behind the scenes" effects of floating point are a relatively new phenomenon though. > But one thing is certain: very few people, Jon Ribbens being one of them, > expects 1/3 to return 0. And that is why Python changed the meaning of > the / operator: because using it for integer division was deeply unpopular > and a bug magnet. Yup. I agree with everything you've said. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2016-05-23 18:33 +1000 |
| Message-ID | <5742c076$0$2880$c3e8da3$76491128@news.astraweb.com> |
| In reply to | #108968 |
On Monday 23 May 2016 10:36, Jon Ribbens wrote:
> 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.
I borrowed Guido's Time Machine, and wrote the following
I suppose some language some day might experiment with swapping the
operators, so that a/b is integer division and a//b is true division.
*nine hours* before your response above. But perhaps that was explicit enough,
so if it will satisfy you, I will state for the record that defining the /
operator to do integer division is not necessarily bad.
But it has been roundly and broadly rejected by the Python community. It was
tried and rejected. One way or another, your opinion is a minority view.
--
Steve
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <grant.b.edwards@gmail.com> |
|---|---|
| Date | 2016-05-21 02:17 +0000 |
| Message-ID | <mailman.64.1463797059.27390.python-list@python.org> |
| In reply to | #108872 |
On 2016-05-20, Steven D'Aprano <steve@pearwood.info> wrote: > On Sat, 21 May 2016 05:20 am, Christopher Reimer wrote: > >> According to "Effective Python: 59 Specific Ways to Write Better Python" >> by Brett Slatkin, Item 12 recommends against using the else block after >> for and while loops (see page 25): "Avoid using else blocks after loops >> because their behavior isn't intuitive and can be confusing." > > By that logic, we ought to: > > - avoid using floats because their behaviour isn't intuitive and > can be confusing; Well, a lot of people probably should avoid floats. I've often said that anybody who hasn't taken a numerical methods class shouldn't be allowed to use floating point. -- Grant
[toc] | [prev] | [next] | [standalone]
| From | Christopher Reimer <christopher_reimer@icloud.com> |
|---|---|
| Date | 2016-05-20 18:23 -0700 |
| Message-ID | <mailman.65.1463797446.27390.python-list@python.org> |
| In reply to | #108872 |
On 5/20/2016 3:43 PM, Steven D'Aprano wrote: > But the idea that you should avoid a Python feature while programming in > Python because Javascript doesn't have it, or Ruby, or C, is surely the > height of muddleheaded thinking. You're not programming Javascript, Ruby or > C, you're programming in Python. The whole point of picking one language > over another is to get access to the tools and features that language > offers. Otherwise you're just wasting your time. For many years I have resisted specializing in a programming language, as I can easily write any program in pseudo code and figure out the syntax for a particular language. Now it does help that most languages have derived from C and share a common feature set (i.e., string, integer, float, if/else, while, for, etc.). From my perspective, tacking on an else block to the end of a for or while loop looks like a bug or a not very well thought out feature. If I was translating a Python program with for/else or while/else statements into a different language, those statements will have to be rewritten anyway. Thank you, Chris R.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-05-21 12:31 +1000 |
| Message-ID | <mailman.67.1463797898.27390.python-list@python.org> |
| In reply to | #108872 |
On Sat, May 21, 2016 at 11:23 AM, Christopher Reimer <christopher_reimer@icloud.com> wrote: > On 5/20/2016 3:43 PM, Steven D'Aprano wrote: > >> But the idea that you should avoid a Python feature while programming in >> Python because Javascript doesn't have it, or Ruby, or C, is surely the >> height of muddleheaded thinking. You're not programming Javascript, Ruby >> or >> C, you're programming in Python. The whole point of picking one language >> over another is to get access to the tools and features that language >> offers. Otherwise you're just wasting your time. > > > For many years I have resisted specializing in a programming language, as I > can easily write any program in pseudo code and figure out the syntax for a > particular language. Now it does help that most languages have derived from > C and share a common feature set (i.e., string, integer, float, if/else, > while, for, etc.). From my perspective, tacking on an else block to the end > of a for or while loop looks like a bug or a not very well thought out > feature. If I was translating a Python program with for/else or while/else > statements into a different language, those statements will have to be > rewritten anyway. That's fine, as long as you (a) restrict your programming languages to those derived from C, and (b) restrict your programming style to the common subset of them all. Trouble is, that "common subset" is actually pretty small. Strings behave very differently in C and high level languages, and for loops are *very* different in different languages. So you'd be throwing out a large amount of expressiveness, plus you're completely unable to use languages built on some other model (eg LISP, or DeScribe Macro Language, or APL). ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Christopher Reimer <christopher_reimer@icloud.com> |
|---|---|
| Date | 2016-05-20 20:47 -0700 |
| Message-ID | <mailman.68.1463802450.27390.python-list@python.org> |
| In reply to | #108872 |
On 5/20/2016 7:31 PM, Chris Angelico wrote: > On Sat, May 21, 2016 at 11:23 AM, Christopher Reimer > <christopher_reimer@icloud.com> wrote: >> On 5/20/2016 3:43 PM, Steven D'Aprano wrote: >> >>> But the idea that you should avoid a Python feature while programming in >>> Python because Javascript doesn't have it, or Ruby, or C, is surely the >>> height of muddleheaded thinking. You're not programming Javascript, Ruby >>> or >>> C, you're programming in Python. The whole point of picking one language >>> over another is to get access to the tools and features that language >>> offers. Otherwise you're just wasting your time. >> >> For many years I have resisted specializing in a programming language, as I >> can easily write any program in pseudo code and figure out the syntax for a >> particular language. Now it does help that most languages have derived from >> C and share a common feature set (i.e., string, integer, float, if/else, >> while, for, etc.). From my perspective, tacking on an else block to the end >> of a for or while loop looks like a bug or a not very well thought out >> feature. If I was translating a Python program with for/else or while/else >> statements into a different language, those statements will have to be >> rewritten anyway. > That's fine, as long as you (a) restrict your programming languages to > those derived from C, and (b) restrict your programming style to the > common subset of them all. Trouble is, that "common subset" is > actually pretty small. Strings behave very differently in C and high > level languages, and for loops are *very* different in different > languages. So you'd be throwing out a large amount of expressiveness, > plus you're completely unable to use languages built on some other > model (eg LISP, or DeScribe Macro Language, or APL). I don't have a problem with (a) because the majority of the programming languages I've been exposed to have derived from the C language. No offense to the LISPers, but LISP is a historical curiosity that I might blow the dust off and take a look at someday. I'll probably learn assembly language before I ever look at LISP. :) But I disagree with (b) on restricting myself to a common subset of ALL the programming languages. Pseudo code allows me to describe a program in very general details. Implementing a program in a programming language requires getting into very specific details. Of course, there are major and minor differences from language to language. If an oddball feature gets the job done, I'll use that. Or maybe not. If I'm uncertain about something, I'll keep going back and forth until I'm satisfied one way or another. The else block tacked on to for and while loops in Python seems very oddball-ish to me. I've always strive to follow best practice whenever possible. The one book I've read -- and so far, the only book on that feature -- recommends not using it. Based on my previous experience, I don't disagree with that author's opinion. If I have a compelling reason to use it, I'll use it. Or I'll simplify it to use helper functions. If I wanted to write portable code, I would have stayed with... Java. O_o Thank you, Chris R.
[toc] | [prev] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2016-05-20 22:18 -0700 |
| Message-ID | <75115580-7a63-4cfb-9689-28eb84b580a0@googlegroups.com> |
| In reply to | #108867 |
On Saturday, May 21, 2016 at 1:51:19 AM UTC+5:30, Christopher Reimer wrote: > On 5/20/2016 8:59 AM, Zachary Ware wrote: > > > On Fri, May 20, 2016 at 3:09 AM, Erik wrote: > >> On 20/05/16 00:51, Gregory Ewing wrote: > >>> It's not so bad with "else" because you need to look back > >>> to find out what condition the "else" refers to anyway. > >> > >> With my tongue only slightly in my cheek, if it was desirable to > >> "fix"/clarify this syntax then I would suggest adding some optional > >> (existing) trailing keywords to 'else' in this context that spells it out: > >> > >> for item in seq: > >> if foo(item): > >> break > >> else if not break: > >> nomatch() > > With tongue firmly cheeked, you can always use the special `:#` operator: > > > > for item in seq: > > if foo(item): > > break > > else:# if no break: > > nomatch() > > > > This has the benefit that you can use whatever syntax you like after > > the `:#`, and use it in any version of Python you want. > > According to "Effective Python: 59 Specific Ways to Write Better Python" > by Brett Slatkin, Item 12 recommends against using the else block after > for and while loops (see page 25): "Avoid using else blocks after loops > because their behavior isn't intuitive and can be confusing." > > Until I read the book, I wasn't aware of this feature (or bug). Doesn't > seem like a feature I would use since it's not commonly found in other > programming languages. As the author demonstrates in his book, I would > probably write a helper function instead. > > Item 13 does recommend using the else block for try/except/else/finally > in exception handling. :) Firstly: let me say that for the specific case of loop-else I am in violent agreement: I find it so confusing that I dont even know what/how it works Coming to the more general attitude expressed above, this view can be eminently sensible or dangerously retrogressive depending... It is a sound and sane view because the field of computer science exists and legitimately so. Which means that, even though when we look around at the field of programming languages what we are struck by is a bedlam of - advertising - fanboyism - latest and bestest koolaid - holy (cow) wars And a corresponding deficit of anything really conceptual, real advances, real understanding; in short truckloads of BS. OTOH the fact that the field of CS exists and is not (only) BS is a good thing. IOW sticking to the well-established canonical core is sound policy compared to jumping onto the latest loud-rattling bandwagon. And yet... Human beings have the propensity of sticking to the norm rather than deviating even when the norm is grievously in error. The following lists some amazingly long lasting errors: http://blog.languager.org/2016/01/how-long.html This is related to the pedagogic principle called "Law of Primacy": | Things learned first create a strong impression in the mind that is difficult | to erase. For the instructor, this means that what is taught must be right | the first time. Given that for the most part, most of us are horribly uneducated [ http://www.creativitypost.com/education/9_elephants_in_the_classroom_that_should_unsettle_us ] how do we go about correcting our wrong primacies? Given that you imagine Lisp is a historical curiosity (have you heard of clojure?) And java (and presumably OOP) is relevant [see Stepanov on OOP: https://en.wikipedia.org/wiki/Object-oriented_programming#Criticism ] I suggest you start with: http://blog.languager.org/2016/01/primacy.html
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2016-05-21 20:05 +1000 |
| Subject | Education [was Re: for / while else doesn't make sense] |
| Message-ID | <574032db$0$22142$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #108897 |
On Sat, 21 May 2016 03:18 pm, Rustom Mody wrote: > Given that for the most part, most of us are horribly uneducated [ > http://www.creativitypost.com/education/9_elephants_in_the_classroom_that_should_unsettle_us > ] > how do we go about correcting our wrong primacies? An interesting article, but very US-centric. Nevertheless, let's not forget that the general school system is designed to churn out more-or-less identical workers capable of pulling the levers on late 19th and early 20th century machines for their bosses. The fact that it does more than that, even if badly, is a bonus. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Christopher Reimer <christopher_reimer@icloud.com> |
|---|---|
| Date | 2016-05-21 08:51 -0700 |
| Subject | Re: Education [was Re: for / while else doesn't make sense] |
| Message-ID | <mailman.84.1463849576.27390.python-list@python.org> |
| In reply to | #108909 |
On 5/21/2016 3:05 AM, Steven D'Aprano wrote: > On Sat, 21 May 2016 03:18 pm, Rustom Mody wrote: > >> Given that for the most part, most of us are horribly uneducated [ >> > http://www.creativitypost.com/education/9_elephants_in_the_classroom_that_should_unsettle_us >> ] >> how do we go about correcting our wrong primacies? > > > An interesting article, but very US-centric. > > Nevertheless, let's not forget that the general school system is designed to > churn out more-or-less identical workers capable of pulling the levers on > late 19th and early 20th century machines for their bosses. The fact that > it does more than that, even if badly, is a bonus. Under various proposals in the U.S., everyone will soon learn how to program and/or become a computer scientist. Won't be long before some snotty-nosed brat graduates from preschool, takes a look at your code, and poops in his diapers. He will then dips his finger into his diaper, write on the whiteboard how your code can be written in a single line, and summary dismiss you with security escorting you off the premises. Gotta love the future. :) Thank you, Chris R.
[toc] | [prev] | [next] | [standalone]
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Date | 2016-05-21 20:08 +0300 |
| Subject | Re: Education [was Re: for / while else doesn't make sense] |
| Message-ID | <87y4732van.fsf@elektro.pacujo.net> |
| In reply to | #108922 |
Christopher Reimer <christopher_reimer@icloud.com>: > Under various proposals in the U.S., everyone will soon learn how to > program and/or become a computer scientist. Won't be long before some > snotty-nosed brat graduates from preschool, takes a look at your code, > and poops in his diapers. He will then dips his finger into his > diaper, write on the whiteboard how your code can be written in a > single line, and summary dismiss you with security escorting you off > the premises. > > Gotta love the future. :) Unfortunately, most CS graduates don't seem to know how to program. Yes, some highschoolers could excel in the post of a senior software engineer -- I've had the privilege of working alongside several specimens. However, it has been known for half a century that good developers are hard to come by. I think it is essential to learn the principles of programming just like it is essential to learn the overall principles of nuclear fission or be able to locate China on the map. However, a small minority of humanity will ever earn a living writing code. At the same time, it may be that in the not-too-distant future, the *only* jobs available will be coding jobs as we start to take the finishing steps of automating all manufacturing, transportation and services. Then, we will have a smallish class of overworked coders who have no use or time for money and vast masses of jobless party-goers who enjoy the fruits of the coders' labor. Marko
[toc] | [prev] | [next] | [standalone]
| From | Rob Gaddi <rgaddi@highlandtechnology.invalid> |
|---|---|
| Date | 2016-05-23 16:44 +0000 |
| Subject | Re: Education [was Re: for / while else doesn't make sense] |
| Message-ID | <nhvc1e$d69$1@dont-email.me> |
| In reply to | #108924 |
Marko Rauhamaa wrote: > Christopher Reimer <christopher_reimer@icloud.com>: > >> Under various proposals in the U.S., everyone will soon learn how to >> program and/or become a computer scientist. Won't be long before some >> snotty-nosed brat graduates from preschool, takes a look at your code, >> and poops in his diapers. He will then dips his finger into his >> diaper, write on the whiteboard how your code can be written in a >> single line, and summary dismiss you with security escorting you off >> the premises. >> >> Gotta love the future. :) > > Unfortunately, most CS graduates don't seem to know how to program. > > Yes, some highschoolers could excel in the post of a senior software > engineer -- I've had the privilege of working alongside several > specimens. However, it has been known for half a century that good > developers are hard to come by. > > I think it is essential to learn the principles of programming just like > it is essential to learn the overall principles of nuclear fission or be > able to locate China on the map. However, a small minority of humanity > will ever earn a living writing code. > > At the same time, it may be that in the not-too-distant future, the > *only* jobs available will be coding jobs as we start to take the > finishing steps of automating all manufacturing, transportation and > services. Then, we will have a smallish class of overworked coders who > have no use or time for money and vast masses of jobless party-goers who > enjoy the fruits of the coders' labor. > > > Marko Well, so long as we're going wildly OT... I think it's not a matter of who's going to earn a living by it. I think it's that, increasingly, programming is similar to carpentry. I can't reframe a house, and certainly can't build cabinetry, but I can do an adequate job putting up a simple wooden shelf. Looked at that way, it becomes a question of teaching people enough of the general principles to be able to muddle though and do a passable job on trivial "But all I want to do is" tasks. It's not a CS degree, it's shop class. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix.
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <lawrencedo99@gmail.com> |
|---|---|
| Date | 2016-06-01 16:39 -0700 |
| Message-ID | <7d453116-c02a-4211-836e-518f571c29a3@googlegroups.com> |
| In reply to | #108830 |
On Friday, May 20, 2016 at 4:43:56 AM UTC+12, Herkermer Sherwood wrote:
> Most keywords in Python make linguistic sense, but using "else" in for and
> while structures is kludgy and misleading.
My objection is not to the choice of keyword, it’s to the whole design of the loop construct.
It turns out C-style for-loops “for (init; test; incr) ...” are very versatile. If my loop has more than one exit, I use the endless form “for (;;)” and do an explicit “break” for every exit condition.
Also, they let me declare a variable that is scoped to the loop, that is initialized just once before the loop starts, e.g.
for (int loopvar = initial_value;;)
{
if (loopvar == limit)
break;
... processing ...
if (found_what_im_looking_for)
break;
++loopvar;
} /*for*/
I wish I could do this in Python...
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2016-06-02 13:44 +1000 |
| Message-ID | <574faba0$0$1506$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #109322 |
On Thursday 02 June 2016 09:39, Lawrence D’Oliveiro wrote: > Also, they let me declare a variable that is scoped to the loop Why do you want variables scoped to the loop? -- Steve
[toc] | [prev] | [next] | [standalone]
| From | Rob Gaddi <rgaddi@highlandtechnology.invalid> |
|---|---|
| Date | 2016-06-02 20:09 +0000 |
| Message-ID | <niq3p5$ahb$1@dont-email.me> |
| In reply to | #109322 |
Lawrence D’Oliveiro wrote:
> On Friday, May 20, 2016 at 4:43:56 AM UTC+12, Herkermer Sherwood wrote:
>> Most keywords in Python make linguistic sense, but using "else" in for and
>> while structures is kludgy and misleading.
>
> My objection is not to the choice of keyword, it’s to the whole design of the loop construct.
>
> It turns out C-style for-loops “for (init; test; incr) ...” are very versatile. If my loop has more than one exit, I use the endless form “for (;;)” and do an explicit “break” for every exit condition.
>
> Also, they let me declare a variable that is scoped to the loop, that is initialized just once before the loop starts, e.g.
>
> for (int loopvar = initial_value;;)
> {
> if (loopvar == limit)
> break;
> ... processing ...
> if (found_what_im_looking_for)
> break;
> ++loopvar;
> } /*for*/
>
> I wish I could do this in Python...
loopvar = initial_value
while True:
do_your_loop_things
if you_want_to_break_then_just:
break
loopvar += 1
Although your loop is really the _canonical_ use case for
for loopvar in range(initial_value, limit+1):
processing
if found_what_im_looking_for:
break
else:
do_whatever_it_is_you_do_when_its_not_found
The limited variable scoping is the only thing missing, and you can get
around that by telling yourself you're not going to use that variable
again, and then believing you on the matter.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2016-06-02 14:46 -0600 |
| Message-ID | <mailman.105.1464900454.1839.python-list@python.org> |
| In reply to | #109380 |
On Thu, Jun 2, 2016 at 2:09 PM, Rob Gaddi
<rgaddi@highlandtechnology.invalid> wrote:
> The limited variable scoping is the only thing missing, and you can get
> around that by telling yourself you're not going to use that variable
> again, and then believing you on the matter.
Or you can actually limit the variable scope using a function:
def the_loop():
for loopvar in range(initial_value, limit+1):
processing
if found_what_im_looking_for:
return it
do_whatever_it_is_you_do_when_its_not_found
thing_i_was_looking_for = the_loop()
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2016-06-02 21:52 +0100 |
| Message-ID | <niq6al$l5c$1@dont-email.me> |
| In reply to | #109380 |
On 02/06/2016 21:09, Rob Gaddi wrote:
> Lawrence D’Oliveiro wrote:
>
>> On Friday, May 20, 2016 at 4:43:56 AM UTC+12, Herkermer Sherwood wrote:
>>> Most keywords in Python make linguistic sense, but using "else" in for and
>>> while structures is kludgy and misleading.
>>
>> My objection is not to the choice of keyword, it’s to the whole design of the loop construct.
>>
>> It turns out C-style for-loops “for (init; test; incr) ...” are very versatile. If my loop has more than one exit, I use the endless form “for (;;)” and do an explicit “break” for every exit condition.
>>
>> Also, they let me declare a variable that is scoped to the loop, that is initialized just once before the loop starts, e.g.
I've had plenty of discussions on c.l.c on how much I dislike C's 'for'
statement!
>
>> for (int loopvar = initial_value;;)
>> {
>> if (loopvar == limit)
>> break;
>> ... processing ...
>> if (found_what_im_looking_for)
>> break;
>> ++loopvar;
>> } /*for*/
>>
>> I wish I could do this in Python...
>
> loopvar = initial_value
> while True:
> do_your_loop_things
> if you_want_to_break_then_just:
> break
> loopvar += 1
One major objection was that C's 'for' isn't really a for-statement at
all (as it is understood in most other languages that haven't just
copied C's version), but is closer to a 'while' statement. Simple
iterative for-loops are more of a DIY effort:
for (i=0; i<N; ++i) {...}
maps to this while loop (expressed as Python syntax);
i=0
while i<N:
....
i+=1
which in Python is normally written:
for i in range(N):
...
> The limited variable scoping is the only thing missing,
That's just part of a general feature of C where each block can have its
own scope. So you can have dozens of 'i' variables within each function,
provided each is defined in a separate block. (I couldn't see the point
of that either!)
--
Bartc
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <lawrencedo99@gmail.com> |
|---|---|
| Date | 2016-06-02 18:05 -0700 |
| Message-ID | <fad93dfc-1a36-4e54-86ee-fa98e1f2ac92@googlegroups.com> |
| In reply to | #109384 |
On Friday, June 3, 2016 at 8:52:52 AM UTC+12, BartC wrote: > One major objection was that C's 'for' isn't really a for-statement at > all (as it is understood in most other languages that haven't just > copied C's version), but is closer to a 'while' statement. Apart from having local loop variables that get initialized just once. Not something you can fake with a “while” statement. That’s what makes C’s for-statement so versatile.
[toc] | [prev] | [next] | [standalone]
Page 10 of 15 — ← Prev page 1 … 8 9 [10] 11 12 … 15 Next page →
Back to top | Article view | comp.lang.python
csiph-web