Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68711 > unrolled thread
| Started by | vasudevram <vasudevram@gmail.com> |
|---|---|
| First post | 2014-03-21 13:42 -0700 |
| Last post | 2014-03-28 17:05 -0500 |
| Articles | 20 on this page of 401 — 30 participants |
Back to article view | Back to comp.lang.python
Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) vasudevram <vasudevram@gmail.com> - 2014-03-21 13:42 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-21 13:54 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) vasudevram <vasudevram@gmail.com> - 2014-03-21 13:56 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-21 14:09 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-21 15:30 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-21 19:06 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-22 13:41 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-21 21:39 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-22 15:51 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-21 22:26 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) "Rhodri James" <rhodri@wildebst.org.uk> - 2014-03-23 00:32 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-22 20:46 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-22 20:16 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-22 21:47 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) "Rhodri James" <rhodri@wildebst.org.uk> - 2014-03-24 02:35 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-24 14:27 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-23 21:14 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-24 16:04 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-24 14:32 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-21 22:48 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-21 23:51 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-22 09:46 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 00:52 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-24 03:03 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-03-24 11:55 +0200
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-24 22:49 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-03-24 14:36 +0200
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-24 23:53 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-24 14:39 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-24 15:22 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-24 14:21 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-24 14:04 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 09:00 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 06:12 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-24 13:42 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 06:57 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 05:28 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 16:43 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-24 11:24 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 16:43 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-03-25 00:43 +0200
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 18:56 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 11:11 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 19:16 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 11:28 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-25 00:32 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 19:50 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Terry Reedy <tjreedy@udel.edu> - 2014-03-24 21:31 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 12:41 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 06:28 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Terry Reedy <tjreedy@udel.edu> - 2014-03-24 21:20 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 21:39 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 06:52 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) alex23 <wuwei23@gmail.com> - 2014-03-26 16:35 +1000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-27 10:44 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-28 03:10 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-27 11:37 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-28 03:48 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-27 15:54 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-28 08:42 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-27 17:14 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-28 13:24 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-27 19:46 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-28 14:06 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-27 20:20 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-27 17:14 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-28 04:45 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-28 00:34 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 16:18 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-29 13:45 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-29 03:08 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 22:18 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-29 14:45 +1100
Keyboard standards (was: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)) Ben Finney <ben+python@benfinney.id.au> - 2014-03-29 15:18 +1100
Re: Keyboard standards Mark H Harris <harrismh777@gmail.com> - 2014-03-28 23:26 -0500
Re: Keyboard standards Chris Angelico <rosuav@gmail.com> - 2014-03-29 16:13 +1100
Re: Keyboard standards Mark H Harris <harrismh777@gmail.com> - 2014-03-29 00:40 -0500
Re: Keyboard standards Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-29 04:02 -0600
Re: Keyboard standards Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-29 16:03 +0000
Re: Keyboard standards Larry Hudson <orgnut@yahoo.com> - 2014-03-29 12:27 -0700
Re: Keyboard standards Michael Torrie <torriem@gmail.com> - 2014-03-29 13:41 -0600
Re: Keyboard standards Larry Hudson <orgnut@yahoo.com> - 2014-03-29 23:53 -0700
Re: Keyboard standards Dave Angel <davea@davea.name> - 2014-03-29 17:26 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-29 03:51 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 23:07 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 23:16 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 23:21 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-29 15:48 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 23:40 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-29 16:08 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-28 22:21 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-29 00:51 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-29 17:03 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-29 03:21 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-29 15:45 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-30 00:52 -0500
OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-30 06:31 +0000
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Chris Angelico <rosuav@gmail.com> - 2014-03-30 17:43 +1100
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Mark H Harris <harrismh777@gmail.com> - 2014-03-30 01:48 -0500
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-30 10:35 +0000
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Chris Angelico <rosuav@gmail.com> - 2014-03-30 23:03 +1100
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Mark H Harris <harrismh777@gmail.com> - 2014-03-30 23:29 -0500
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Mark H Harris <harrismh777@gmail.com> - 2014-03-30 23:57 -0500
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Chris Angelico <rosuav@gmail.com> - 2014-03-31 16:05 +1100
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Mark H Harris <harrismh777@gmail.com> - 2014-03-31 00:33 -0500
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-31 09:31 +0100
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Mark H Harris <harrismh777@gmail.com> - 2014-03-31 00:23 -0500
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Chris Angelico <rosuav@gmail.com> - 2014-03-31 16:44 +1100
Re: OFF TOPIC Spanish in the USA Marko Rauhamaa <marko@pacujo.net> - 2014-03-31 11:39 +0300
Re: OFF TOPIC Spanish in the USA Ned Batchelder <ned@nedbatchelder.com> - 2014-03-31 07:33 -0400
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-03-31 08:41 -0400
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Chris Angelico <rosuav@gmail.com> - 2014-04-01 00:04 +1100
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] "Rhodri James" <rhodri@wildebst.org.uk> - 2014-03-31 21:47 +0100
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Terry Reedy <tjreedy@udel.edu> - 2014-03-31 18:06 -0400
Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?] Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-03-31 20:03 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Larry Hudson <orgnut@yahoo.com> - 2014-03-30 00:32 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-30 10:44 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) "Rhodri James" <rhodri@wildebst.org.uk> - 2014-03-30 23:57 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) MRAB <python@mrabarnett.plus.com> - 2014-03-31 00:20 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Grant Edwards <invalid@invalid.invalid> - 2014-03-31 14:14 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Walter Hurry <walterhurry@gmail.com> - 2014-03-31 00:39 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Roy Smith <roy@panix.com> - 2014-03-30 08:08 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-30 15:22 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-30 10:03 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-31 01:08 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-31 17:47 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ben Finney <ben+python@benfinney.id.au> - 2014-03-31 17:53 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-31 00:36 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) wxjmfauth@gmail.com - 2014-03-31 01:32 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Roy Smith <roy@panix.com> - 2014-03-31 08:16 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) "Rhodri James" <rhodri@wildebst.org.uk> - 2014-03-31 21:46 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-01 16:26 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-02 08:49 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-01 18:18 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Terry Reedy <tjreedy@udel.edu> - 2014-04-01 18:33 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-03 11:38 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-04-03 20:14 +0300
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-04-03 11:40 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-03 13:55 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-04-03 22:43 +0300
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-03 22:12 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-04 09:43 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-03 21:09 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-04 07:52 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-04 19:11 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-04 02:13 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-04 10:08 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-04 11:01 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-05 00:20 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) alex23 <wuwei23@gmail.com> - 2014-04-04 12:07 +1000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-03 21:29 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-04 09:20 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-04 15:58 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-04 15:40 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-04 22:50 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-04 17:07 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 09:39 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-04 17:52 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 09:57 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-05 00:16 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-04 23:10 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 15:40 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 00:11 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-04 23:02 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 00:37 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ben Finney <ben+python@benfinney.id.au> - 2014-04-05 17:01 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 01:48 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 18:08 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 01:48 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-04 23:07 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-04 17:52 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Terry Reedy <tjreedy@udel.edu> - 2014-04-04 23:04 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-04 23:18 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 14:22 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Terry Reedy <tjreedy@udel.edu> - 2014-04-05 00:10 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-04 17:07 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-05 00:00 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 12:51 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-04 23:31 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 15:49 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 00:23 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 16:55 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 00:23 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-04-04 20:42 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 00:02 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 16:24 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ben Finney <ben+python@benfinney.id.au> - 2014-04-05 16:29 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 16:57 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-04-04 23:59 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-05 18:10 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-05 10:19 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Terry Reedy <tjreedy@udel.edu> - 2014-04-05 07:20 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Roy Smith <roy@panix.com> - 2014-04-05 10:28 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-04 09:53 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-04-04 03:24 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Terry Reedy <tjreedy@udel.edu> - 2014-04-04 06:43 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 22:59 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 23:59 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-04-06 12:05 +0300
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-06 16:52 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-04-06 10:31 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-07 03:54 +1000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-04-06 11:13 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-07 04:46 +1000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-04-06 19:32 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-07 20:33 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) MRAB <python@mrabarnett.plus.com> - 2014-04-08 02:52 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-08 13:02 +1000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve@pearwood.info> - 2014-04-08 08:21 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) alex23 <wuwei23@gmail.com> - 2014-04-09 10:39 +1000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-09 12:26 +1000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-04-08 03:53 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-07 03:27 +1000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-04-06 23:23 +0300
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-06 19:09 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-04-07 04:14 +1000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-04-06 23:10 +0300
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-06 21:56 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-06 23:48 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Terry Reedy <tjreedy@udel.edu> - 2014-04-06 20:45 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-04-06 18:54 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve@pearwood.info> - 2014-04-07 05:10 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-04-07 08:14 +0300
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-04-08 09:03 +0200
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-04-07 07:54 +0300
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-07 12:19 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-04-05 23:01 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-28 23:10 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-29 00:51 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-29 17:53 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-30 01:22 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-30 16:22 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-03-29 13:39 +0200
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Roy Smith <roy@panix.com> - 2014-03-29 07:53 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-03-29 13:59 +0200
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Gene Heskett <gheskett@wdtv.com> - 2014-03-29 13:48 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-30 00:57 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Gene Heskett <gheskett@wdtv.com> - 2014-03-29 13:46 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 10:01 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 18:44 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 10:57 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 06:16 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-24 17:58 -0600
Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 20:00 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 22:15 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 14:17 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 22:25 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 22:28 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Roy Smith <roy@panix.com> - 2014-03-24 23:29 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 14:51 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 22:59 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 21:08 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 15:29 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 22:00 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 16:08 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-25 00:14 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 22:23 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 16:31 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 16:27 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-25 00:34 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 22:42 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-25 00:47 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 16:54 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 16:48 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-25 00:56 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Roy Smith <roy@panix.com> - 2014-03-25 08:36 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-25 05:53 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-03-25 14:43 +0100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-25 06:52 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-26 00:56 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-25 07:08 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-25 14:23 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-25 08:19 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-26 09:33 +1300
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-25 11:58 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-03-25 20:02 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-25 01:01 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 17:19 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 07:03 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 18:12 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-03-25 20:05 -0400
Re: Time we switched to unicode? Marko Rauhamaa <marko@pacujo.net> - 2014-03-25 10:05 +0200
Re: Time we switched to unicode? Chris Angelico <rosuav@gmail.com> - 2014-03-25 19:23 +1100
Re: Time we switched to unicode? Steven D'Aprano <steve@pearwood.info> - 2014-03-25 08:59 +0000
Re: Time we switched to unicode? Chris Angelico <rosuav@gmail.com> - 2014-03-25 20:03 +1100
Re: Time we switched to unicode? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-03-25 18:24 +0100
Re: Time we switched to unicode? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-26 01:01 +0000
Re: Time we switched to unicode? Chris Angelico <rosuav@gmail.com> - 2014-03-26 06:40 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 22:28 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-25 00:36 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 06:07 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-25 01:48 -0500
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-03-25 10:43 +0100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 20:54 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-03-25 11:38 +0100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-25 11:14 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-03-25 12:46 +0100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-25 05:09 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-25 15:18 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Terry Reedy <tjreedy@udel.edu> - 2014-03-25 19:55 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-26 00:12 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Terry Reedy <tjreedy@udel.edu> - 2014-03-26 00:30 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-25 21:56 -0700
Delayed evaluation of expressions [was Re: Time we switched to unicode?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-26 16:05 +0000
Re: Delayed evaluation of expressions [was Re: Time we switched to unicode?] Rustom Mody <rustompmody@gmail.com> - 2014-03-26 10:32 -0700
Re: Delayed evaluation of expressions [was Re: Time we switched to unicode?] Rustom Mody <rustompmody@gmail.com> - 2014-03-26 10:57 -0700
Re: Delayed evaluation of expressions [was Re: Time we switched to unicode?] Chris Angelico <rosuav@gmail.com> - 2014-03-27 09:24 +1100
Re: Delayed evaluation of expressions Marko Rauhamaa <marko@pacujo.net> - 2014-03-27 00:45 +0200
Re: Delayed evaluation of expressions Rustom Mody <rustompmody@gmail.com> - 2014-03-26 22:02 -0700
Re: Delayed evaluation of expressions [was Re: Time we switched to unicode?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-26 23:43 +0000
Re: Delayed evaluation of expressions [was Re: Time we switched to unicode?] Rustom Mody <rustompmody@gmail.com> - 2014-03-26 18:59 -0700
Re: Delayed evaluation of expressions [was Re: Time we switched to unicode?] Terry Reedy <tjreedy@udel.edu> - 2014-03-26 20:44 -0400
Re: Delayed evaluation of expressions [was Re: Time we switched to unicode?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-27 02:16 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Roy Smith <roy@panix.com> - 2014-03-25 08:35 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-26 00:13 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-25 14:13 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-26 01:37 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-26 09:58 +1300
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-03-25 20:10 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-26 09:21 +1300
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Larry Martell <larry.martell@gmail.com> - 2014-03-25 16:31 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-25 21:22 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 15:19 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 06:04 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 17:26 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Roy Smith <roy@panix.com> - 2014-03-25 08:24 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-03-25 19:44 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 20:43 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 14:57 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 05:47 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 23:10 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 17:33 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 23:41 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 17:50 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Terry Reedy <tjreedy@udel.edu> - 2014-03-25 18:39 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 17:12 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 23:35 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 17:45 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 23:52 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) "Rhodri James" <rhodri@wildebst.org.uk> - 2014-03-27 01:16 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-27 12:26 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 20:44 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-24 20:56 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 15:14 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 07:03 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-25 00:22 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-03-25 11:24 +0100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Roy Smith <roy@panix.com> - 2014-03-25 08:21 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-25 13:36 +0000
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-03-25 15:01 +0100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Terry Reedy <tjreedy@udel.edu> - 2014-03-25 22:10 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-26 13:39 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-27 01:32 -0600
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-27 01:43 -0600
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 22:12 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-03-25 13:07 +0100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-25 23:45 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Rustom Mody <rustompmody@gmail.com> - 2014-03-25 06:07 -0700
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Chris Angelico <rosuav@gmail.com> - 2014-03-26 00:50 +1100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-26 09:37 +1300
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-03-25 14:07 +0100
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Terry Reedy <tjreedy@udel.edu> - 2014-03-25 20:24 -0400
Re: Time we switched to unicode? (was Explanation of this Python language feature?) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-03-26 10:22 +0100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve@pearwood.info> - 2014-03-25 06:20 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve@pearwood.info> - 2014-03-24 09:49 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-24 22:21 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 14:47 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-25 01:45 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 13:17 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-25 02:06 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 22:48 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-24 09:58 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 13:58 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-24 19:13 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-24 13:12 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 06:22 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-24 22:58 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 10:07 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Terry Reedy <tjreedy@udel.edu> - 2014-03-24 21:04 -0400
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-25 06:45 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-22 04:47 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Chris Angelico <rosuav@gmail.com> - 2014-03-22 16:05 +1100
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-03-22 12:24 +0200
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-22 03:09 -0600
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-03-22 12:30 +0200
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-22 10:16 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-22 10:40 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-22 17:57 +0000
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Marko Rauhamaa <marko@pacujo.net> - 2014-03-22 20:40 +0200
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Rustom Mody <rustompmody@gmail.com> - 2014-03-22 11:42 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) 88888 Dihedral <dihedral88888@gmail.com> - 2014-03-25 03:17 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-22 10:34 +1300
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) vasudevram <vasudevram@gmail.com> - 2014-03-22 13:59 -0700
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Mark H Harris <harrismh777@gmail.com> - 2014-03-24 20:56 -0500
Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Dan Stromberg <drsalists@gmail.com> - 2014-03-27 16:45 -0700
How to flatten a list of lists was (Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 17:00 -0500
How to flatten a list of lists was (Explanation of this Python language feature?) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 17:00 -0500
To flatten a nested list was (Explanation of this Python language feature? [x for x in x for x in x] Mark H Harris <harrismh777@gmail.com> - 2014-03-28 17:05 -0500
Re: To flatten a nested list was (Explanation of this Python language feature? [x for x in x for x in x] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-29 02:31 +0000
Re: To flatten a nested list was (Explanation of this Python language feature? [x for x in x for x in x] Mark H Harris <harrismh777@gmail.com> - 2014-03-28 22:33 -0500
To flatten a nested list was (Explanation of this Python language feature? [x for x in x for x in x] Mark H Harris <harrismh777@gmail.com> - 2014-03-28 17:05 -0500
Page 19 of 21 — ← Prev page 1 … 17 18 [19] 20 21 Next page →
| From | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
|---|---|
| Date | 2014-03-25 14:07 +0100 |
| Subject | Re: Time we switched to unicode? (was Explanation of this Python language feature?) |
| Message-ID | <mailman.8517.1395752847.18130.python-list@python.org> |
| In reply to | #68946 |
On 25-03-14 13:45, Chris Angelico wrote: > It makes the same notation mean different things, in ways that are > hard to render clearly. You can write a Py3 program and put this at > the top for Py2: > > try: > input = raw_input > range = xrange > except NameError: > # We're running on Python 3 > pass > > But you can't do the same for braces. You'd have to eschew *both* > literal-ish notations and use explicit constructors everywhere. Not > clean. What about it, is not clean? I understand that you prefer it how it worked out. That is fine by me. But that doesn't make the alternative unclean. Is having to write "set()" unclean somehow when you need an empty set? I wouldn't think so. So I see no reason why having to write "dict()" when you need an empty dictionary wouldn't be clean. Nor would it be unclean, when you have to write somethings a bit differently when you want your program to be compatible both with python2 and python3. You will also need to prefix all your (unicode) strings with u and all your byte strings with b. And probably some more stuff if you want to avoid some pitfalls. -- Antoon Pardon
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2014-03-25 20:24 -0400 |
| Subject | Re: Time we switched to unicode? (was Explanation of this Python language feature?) |
| Message-ID | <mailman.8554.1395793492.18130.python-list@python.org> |
| In reply to | #68946 |
On 3/25/2014 8:07 AM, Antoon Pardon wrote:
> On 25-03-14 12:12, Chris Angelico wrote:
>
>> On Tue, Mar 25, 2014 at 9:24 PM, Antoon Pardon
>> <antoon.pardon@rece.vub.ac.be> wrote:
>>> No they didn't have to. With the transition to python3, the developers
>>> could have opted for empty braces to mean an empty set. And if they
>>> wanted a literal for an empty dictionary, they might have chosen {:}.
>>> Backward-compatibility was already broken so that wasn't an argument.
>> Python 3.0 didn't just say "to Hades with backward compatibility". The
>> breakage was only in places where it was deemed worthwhile. Changing
>> the meaning of {} would have only small benefit and would potentially
>> break a LOT of programs, so the devs were right to not do it.
>
> More programs than those who broke because print was now a function?
It is quite possible that the print change broke more than the dict
change would have. The difference is that the print statement syntax was
both awful and limited. The print function uses standard syntax and is
more flexible.
The fact that print could be turned into a function shows that it did
not need to be a statement. All other simple statements except 'pass'
either implicitly quote an expression in the statement, jump control, or
declare something to the compiler.
The other fact that Chris noted, that '{}' would have been valid but
with different meanings in Py1/2 versus Py3, was a factor on the cost
side. We generally try to avoid such ambiguities.
Except for this last point, I was in favor of the switch.
--
Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
|---|---|
| Date | 2014-03-26 10:22 +0100 |
| Subject | Re: Time we switched to unicode? (was Explanation of this Python language feature?) |
| Message-ID | <mailman.8566.1395825743.18130.python-list@python.org> |
| In reply to | #68946 |
On 26-03-14 01:24, Terry Reedy wrote:
> The other fact that Chris noted, that '{}' would have been valid but
> with different meanings in Py1/2 versus Py3, was a factor on the cost
> side. We generally try to avoid such ambiguities.
>
> Except for this last point, I was in favor of the switch.
In my estimation the cost would have been bearable. But I understand this
kind of things is always a judgement call and different people can legitimately
come to different conclusions.
--
Antoon Pardon
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2014-03-25 06:20 +0000 |
| Message-ID | <53312023$0$2756$c3e8da3$76491128@news.astraweb.com> |
| In reply to | #68917 |
On Mon, 24 Mar 2014 17:58:11 -0600, Ian Kelly wrote: > On Mon, Mar 24, 2014 at 3:43 PM, Mark H Harris <harrismh777@gmail.com> > wrote: >> Aside from the sin of spelling out "lambda," >> should be ( \x y -> x + y ) a b ) but, neither here nor >> there... > > Well no, it *should* be λx y . x + y but apparently some people don't > have that character on their keyboards, so it gets written as lambda or > \ instead. Holy cow! Is that where the Haskell syntax comes from? I never would have guessed in a million years that backslash \ was meant to be an ASCII-ified version of lambda. What a stupid idea that is. Writing "lambda" out in full is much more sensible. > Personally I dislike the \ style; it doesn't really resemble > a λ that closely, and to me the backslash denotes escape sequences and > set differences. Nor is Python alone in spelling out lambda: Scheme and > Common Lisp spell it the same way. As far as I know the \ for λ is > unique to Haskell. At least they don't spell it "fun". -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2014-03-24 09:49 +0000 |
| Message-ID | <532fffaf$0$29878$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #68851 |
On Mon, 24 Mar 2014 00:52:52 -0500, Mark H Harris wrote:
> On 3/22/14 4:46 AM, Steven D'Aprano wrote:
>> On Fri, 21 Mar 2014 23:51:38 -0500, Mark H Harris wrote:
>>
>>> Lambda is a problem, if only because it causes confusion. What's the
>>> problem? Glad you asked. The constructs DO NOT work the way most
>>> people would expect them to, having limited knowledge of python!
>
> One of the best links for understanding what is wrong with lambda is
> here, from Guido, (by the way I agree totally with his assessment, there
> is no point really in writing it out again):
>
> http://www.artima.com/weblogs/viewpost.jsp?thread=98196
It's only one paragraph. Here it is:
Why drop lambda? Most Python users are unfamiliar with Lisp or
Scheme, so the name is confusing; also, there is a widespread
misunderstanding that lambda can do things that a nested function
can't -- I still recall Laura Creighton's Aha!-erlebnis after I
showed her there was no difference! Even with a better name, I think
having the two choices side-by-side just requires programmers to
think about making a choice that's irrelevant for their program; not
having the choice streamlines the thought process. Also, once map(),
filter() and reduce() are gone, there aren't a whole lot of places
where you really need to write very short local functions; Tkinter
callbacks come to mind, but I find that more often than not the
callbacks should be methods of some state-carrying object anyway (the
exception being toy programs).
None of map(), filter() or reduce() are gone. reduce() has been pushed
out into a module, but map() and filter() have actually been enhanced.
Any suggestion that lambda is obsolete flounders on that fact.
There's no doubt that lambda is less-often useful than is the def
statement. But not only is it still useful, but there is a continual
stream of people asking for Python to make it *more useful* by allowing
the body of a lambda to be a full block, not just a single statement.
Guido has stated (although I cannot remember where, so cannot paste a
link) that he accepts that in principle, so long as somebody comes up
with acceptable syntax.
In Ruby, anonymous blocks are used *all the time*. Python is not Ruby,
and never will be, but a lightweight way to generate anonymous functions
in expressions is one difference between a modern, powerful language, and
an archaic or toy under-powered language. I'm too lazy to do this the
right way, but there are at least 99 mentions of "lambda" in the 3.3
standard library:
steve@runes:/usr/local/lib/python3.3$ grep lambda *.py | wc -l
99
It's used in calendar, cgitb, configparser, difflib, decimal, functools,
inspect, os, pydoc and others. Python is a programming language aimed at
programmers, not a toy. It should include tools that programmers use,
like threads, closures, first-class functions. And lambda.
>> Why is that a problem? Would you consider it a problem that people who
>> don't understand BASIC can't understand BASIC? ("I don't get the
>> difference between GOTO and GOSUB. {snip}
>>
>> The problem is ignorance, not the calculator, and not lambda.
>
> You're argument, based on analogy, is also a red herring, as well a
> straw man.
Please stop misusing "straw man". It has a specific meaning:
https://yourlogicalfallacyis.com/strawman
> Lambda is a problem of confusion for scientists and other
> mathematicians (amateur and otherwise) who may be confused because
> python's lambda does not do precisely what they might expect from other
> functional programming languages, nor does it match precisely with the
> lambda calculus.
Yes, you've already said that. And my response remains the same: users of
a language should be expected to learn the language, at least to the
point that they can "get by". One doesn't need ten thousand hours
experience and to be an expert. But nor should the confusion of somebody
who doesn't know the language count for much.
Python's ints don't work exactly the same as ints do in some other
languages, nor do Python's strings, nor is Python's object model
precisely the same as that of some other languages. I think that it would
be a ridiculous idea to discard int, str and the entire object system
just because some people are surprised that Python doesn't behave exactly
like some other language. I don't think lambda is any different.
The same argument applies to *any other language*. Ocaml is not precisely
the same as Haskell, Java not precisely the same as C++, Ruby is not
precisely the same as Javascript. Should Ruby discard their anonymous
blocks because they don't work "precisely" the same as Haskell? Or
perhaps Haskell should throw the towel in because it doesn't behave
"precisely" the same as Ruby?
Of course not -- new languages come into existence precisely so that they
will be different from what is already there. Who is to say that there
aren't people who like Python's lambda *because* it is different from the
anonymous functions in other languages? Or because it is less abstract
than the lambda calculus?
Other languages -- not even Lisp -- don't get to be the sole decider as
to what counts as an anonymous function. Python's lambda may be limited,
but it is a perfectly fine lambda for what it is intended to do.
> Its also confusing to sophisticated users of all
> stripes who may not be aware of "lambda" at all.
If they're not aware of lambda, how are they confused by it?
>> You've told us that "most people" (which people? dentists? lawyers?
>> illiterate tribesmen from the Amazon? professional programmers?) are
>> surprised by lamba's behaviour, but you haven't actually told us what
>> behaviour is surprising, or what "most people" expect lambda to do.
>> Perhaps you ought to?
>
> I love your rhetoric, actually, but red herrings all . . .
No, not really. I don't understand who your intended audience for Python
is. If I were to try to guess, I suspect that you want to dumb Python
down until it is like Dartmouth BASIC circa 1980 except without the line
numbers and with a slightly different syntax. Perhaps I'm wrong, I
certainly hope I'm wrong, but that's the impression I got from your
comments on the python-ideas list.
Python is a programming language. People who program in Python are
programmers. It doesn't matter whether they are school children, or
scientists, or farmhands, once they start writing programs, they are
programming, which makes them a programmer. They might not be paid for
it, but they are still programmers. Who should be using Python, if not
programmers?
> Here is a link that advocates lambda (map, filter, and reduce) as a
> very powerful construct for doing various things: I agree:
>
> http://www.secnetix.de/olli/Python/lambda_functions.hawk
>
> Its a great link, but the important sentence for this discussion is
> this unique quote, about "lambda,"
>
> >"This is not exactly the same as lambda in functional
>> programming languages, but it is a very powerful concept . . ."
>
> People who understand lambda from functional languages must hassle
> with the fact that lambda is different in python, and people who do not
> understand functional programming languages (nor the lambda calculus)
> are confused by the syntax, also just what it does.
You want to remove lambda because it causes confusion. Okay, for the sake
of the argument I will agree that lambda is confusing. Do you know what
else is confusing?
Threading is confusing. So is multiprocessing. So are databases. Unicode
is confusing. First-class functions are confusing. Recursion is
confusing. Closures are confusing. List comprehensions are confusing.
What the hell are trampolines? I'm certainly confused by them.
If we remove lambda because it is confusing, shouldn't we also remove all
these other confusing things? Where shall we stop?
Should we stop only when Python is a confusion-free, utterly useless toy
language? I don't think so. Or should we stop *before* going down that
path? You want to single out lambda. I don't think we should.
>> Python is not a pure functional language, but you can write functional
>> code in it. If you want a pure functional language, you know where to
>> find one.
>
> Yes, that's obvious; but you're missing the point. Python is not a
> functional language, and implying that it can be used as one is
> misleading at best (maybe a lie at worst) just because it has a
> construct for generating a dynamic anonymous function.
I didn't say that Python can be used as a functional language. I said you
can write functional code in Python. And that is so obviously true that I
cannot believe that you are disputing it.
Functions are first-class values. You can pass them around as arguments
to other functions. You can wrap them to make closures, or compose them.
You can return functions from other functions. You can, if you wish,
eschew holding state and write pure functions with no side-effects and no
state. You can even eschew local variables (well, mostly) inside your
functions and do (nearly) everything by composing other functions. You
can write pipelines of iterators, generators or co-routines.
It may be hard to write an *entire* application using nothing but
functional style in Python, but using functional style throughout the
application is so easy and simple that most people don't even realise
that they are writing in a functional style when they do so.
>> (I wonder whether, say, Haskell has the people coming along and
>> demanding that it should become more like Python?)
>
> Another straw man.
>
> Well, number one, I'm not demanding anything. Number two, everyone
> who uses Haskell (for whatever reason) knows well from the start that
> its a pure functional programming language. That is the advertisement,
> and that is the expectation. No one expects anything different.
And everyone who uses Python ought to know that Python is not. That is
the advertisement, and that ought to be the expectation.
Anonymous functions are not the sole preserve of purely functional
languages, any more than objects are the sole preserve of purely OOP
languages.
>>> I can see uses for python's lambda. But, honestly, I think python
>>> could deprecate its use and in five years just remove it from the
>>> language; along with filter, map, and reduce !
>>
>> Python could deprecate many things. It would make Python a worse
>> language.
>
> How so? Read Guido's argument above. Another way to answer this
> question is that I have been programming with Python for almost a decade
> and I've not used lambda. In fact, I have gone out of my way to NOT use
> lambda because I am fully aware that the BDFL hates it.
In other words, you have had situations where you *could have* used
lambda, perhaps even *should have* used lambda, but you intentionally
went *out of your way* (i.e. made the job harder than it needed to be) to
avoid it, just to slavishly ape the BDFL.
Thank you for just proving my point for me. Your code would have been
better, or at least easier, with lambda. Removing it would make the
language worse, not better.
> Reduce is no
> longer in the standard library (although you can import it)
You mean it is no longer in the builtin namespace. It is still in the
standard library.
> and there
> are equally good ways to do what lambda was designed for without the
> hassle nor confusion.
Incorrect. lambda was designed to allow you to create anonymous functions
in an expression, not as a statement. There is *no other way* to do that
in Python. Even if you come up with some weird hack involving exec or
FunctionType and code objects, it won't be *equally good*. It will be a
broken, third-rate imitation of lambda.
>> By the way, are you aware that lambda is *identical* to def except for
>> three things?
>>
>> - lambda is an expression, not a statement like def;
>>
>> - the body of a function created with lambda is limited to a
>> single expression, not a block;
>>
>> - the function object created with lambda has a generic name.
>
> Absolutely, thank you for pointing those out ! You forgot that
> lambdas can be used in expressions while def functions may not...
Umm, read my list again. It's the first item.
> but
> you really have proved my point. There is so little difference between
> the two that (for the sake of clarity and reducing confusion) it might
> be good to just remove the lambda thing altogether. Just say'in.
The *number* of differences may be small, but the *consequences* of those
differences are enormous.
>> So unless the surprising behaviour about lambda that you're about to
>> tell us about relates to one of those three things, I *guarantee* that
>> functions created with def have the same surprising behaviour.
>
> No, the surprising behavior is that python lambda does not work
> exactly the way that lambda works in functional programming languages
Then neither does def.
Would you like to discard def as well? No? Why not?
> (see the two links provided) the confusion it creates for "normal" users
> does not warrant its inclusion in the language.
>
> Having said that, I must admit that I've "played" with lambda
> extensively and find it interesting from a comp sci standpoint, but,
> again, for normal users I don't think there is a really good value add
> for having it in the language.
--
Steven
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-03-24 22:21 +1100 |
| Message-ID | <mailman.8445.1395660083.18130.python-list@python.org> |
| In reply to | #68857 |
On Mon, Mar 24, 2014 at 8:49 PM, Steven D'Aprano <steve@pearwood.info> wrote: > I'm too lazy to do this the > right way, but there are at least 99 mentions of "lambda" in the 3.3 > standard library: > > steve@runes:/usr/local/lib/python3.3$ grep lambda *.py | wc -l > 99 I'm not too lazy to do it the right way, but I don't have 3.3 handy, so I've done it on 3.4 instead. There are 77 instances of lambda nodes in the files you list there - which are the ones that aren't in packages. (Note that two instances of lambda on the same line would count as one in Steven's figure, but as two in mine. Also, his counts comments. Still, his way's a lot easier to calculate, and it's in the right ball-park.) Including all subdirectories raises that figure to, get this, 1230. That's actual uses of the lambda keyword as parsed by Python. This does include the test suite, though. Removing all files with "/test/" in the names cuts that figure to only 273. But that's still two hundred and seventy-three places where the Python standard library uses lambda - a respectable figure. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Mark H Harris <harrismh777@gmail.com> |
|---|---|
| Date | 2014-03-24 14:47 -0500 |
| Message-ID | <lgq23s$44k$1@speranza.aioe.org> |
| In reply to | #68857 |
On 3/24/14 4:49 AM, Steven D'Aprano wrote:
> There's no doubt that lambda is less-often useful than is the def
> statement. But not only is it still useful, but there is a continual
> stream of people asking for Python to make it *more useful* by allowing
> the body of a lambda to be a full block, not just a single statement.
> Guido has stated (although I cannot remember where, so cannot paste a
> link) that he accepts that in principle, so long as somebody comes up
> with acceptable syntax.
Now, this will seem strange to you, but if lambda were expanded to
include an entire block, well now, I would know two things:
1) python has commitment to lambda and
2) lambda would become WAY more useful... ie., the only way to have a
"block expression" embedded in an expression ! I'd vote for that. But
as someone else noted, inner functions work as well (now) and are really
more readable, so ...
> It's used in calendar, cgitb, configparser, difflib, decimal, functools,
> inspect, os, pydoc and others. Python is a programming language aimed at
> programmers, not a toy. It should include tools that programmers use,
> like threads, closures, first-class functions. And lambda.
This is a valid point (its used a couple of hundred times). It could
be replaced in probably of week of constant programming effort. Neither
here nor there, because nobody at this point is demanding it.
>> Lambda is a problem of confusion for scientists and other
>> mathematicians (amateur and otherwise) {snip}
>{snip}
> But nor should the confusion of somebody
> who doesn't know the language count for much.
This is the main disagreement between the two of us on this topic.
It should count for TONS; whole metric TONs. Because someone who
understands python primarily, and after five years of coding (say me)
somebody tells (me) to use lambda in a key clause so that my sort will
work, or work better, or work "their" way; and I have no idea why I need
this nameless function (after I find out that "that" is what it is!)
Its confusing, and please contrast between complicated. I don't mind
complicated, or extensive, or even hard, but when something is
needlessly confusing, then why?
> Python's ints don't work exactly the same as ints do in some other
> languages, nor do Python's strings, nor is Python's object model
> precisely the same as that of some other languages. I think that it would
> be a ridiculous idea to discard int, str and the entire object system
> just because some people are surprised that Python doesn't behave exactly
> like some other language. I don't think lambda is any different.
Your logic is faulty here. Conceptually python's lambda doesn't
work as expected, from contexts that define lambda and where lambda in
functional programming is VERY important. For one thing, why would we
want to "spell out" the word "lambda". ( \x y -> x + y ) a b )
If we're going to use lambda, then use it.
> Other languages -- not even Lisp -- don't get to be the sole decider as
> to what counts as an anonymous function. Python's lambda may be limited,
> but it is a perfectly fine lambda for what it is intended to do.
Is that the same as George W. Bush's "decider" ?
I agree, and so does the link I referenced, for what it was designed
to do, its powerful; esp if one needs to embed a function in an
expression; that is what lambda is for.
>> Its also confusing to sophisticated users of all
>> stripes who may not be aware of "lambda" at all.
>
> If they're not aware of lambda, how are they confused by it?
See above. They are recommended its use (maybe on this list) and
they just don't get it; because its unnecessarily confusing.
> No, not really. I don't understand who your intended audience for Python
> is. If I were to try to guess, I suspect that you want to dumb Python
> down until it is like Dartmouth BASIC circa 1980 except without the line
> numbers and with a slightly different syntax. Perhaps I'm wrong, I
> certainly hope I'm wrong, but that's the impression I got from your
> comments on the python-ideas list.
Actually it was circa 1964. Actually, it was precisely 1964 (I was
there).
No, I'm not advocating for dumb-down simplicity. Aristotle said that
virtue is found at the mean. Either end of the spectrum is a problem
(overly complicated, towards overly simplified) those end-points we must
flee like the black plague. Normal people with reasonable training
(college education) should be able to use python easily without
confusion and without a computer science degree. Programming should be a
liberal art available to everyone in the set of all "normal" educated
people. Some developers (themselves perhaps with degrees Ph.D. in
mathematics or computer science) forget about the fact that "normal"
educated people want to leverage their computer (maybe with python) for
problem solution without having to become a professional computer
scientist. I am advocating for those people.
> You want to remove lambda because it causes confusion. Okay, for the sake
> of the argument I will agree that lambda is confusing. Do you know what
> else is confusing?
I don't want to remove anything at this point. I am only suggesting
that over time the python community might evaluate whether the lambda
(map, filter, reduce) thing is a language benefit. If so, manet in
aeternum. Elif, deprecate it and over time phase it out completely. Its
a community decision of course, and I'm NOT demanding anything.
> Threading is confusing. So is multiprocessing. So are databases. Unicode
> is confusing. First-class functions are confusing. Recursion is
> confusing. Closures are confusing. List comprehensions are confusing.
> What the hell are trampolines? I'm certainly confused by them.
Argument by analogy almost never works. Please don't confuse my word
"confusing" with your interpretation "complicated". Actually, I do not
find any of those above mentioned as "confusing," while I do admit they
are complicated--even extremely complicated. An intelligent person
educated in the liberal arts should be able to sit down over time and
pick-up the concepts in a new area--without--being confused by the
material or presentation. Lambda is confusing NOT because its
complicated (because its not) but because 1) it does not work like other
lambda concepts in functional programming, and 2) because the syntax
does not lend itself easily to immediate interpretation (by normal
people) nor does it lend itself easily to explanation even in the best
effort.
> If we remove lambda because it is confusing, shouldn't we also remove all
> these other confusing things? Where shall we stop?
No. see above.
> Should we stop only when Python is a confusion-free, utterly useless toy
> language? I don't think so. Or should we stop *before* going down that
> path? You want to single out lambda. I don't think we should.
No. see above.
> I didn't say that Python can be used as a functional language. I said you
> can write functional code in Python. And that is so obviously true that I
> cannot believe that you are disputing it.
I'm not disputing that, not in the least. But advertising that
python can be used to write functional code is misleading (particularly
when lambda is included ;map,filter, reduce) because those who KNOW
functional programming are going to be either 1) confused, or more
likely, 2) disappointed. Yes, I can make a nameless function
(expression) and pass it to another function as an argument. True
enough, and powerful enough, but very confusing when the other aspects
of functional programming with lambda do not hold precisely. Ok,
functional with caveats.
>> In fact, I have gone out of my way to NOT use
>> lambda because I am fully aware that the BDFL hates it.
>
> In other words, you have had situations where you *could have* used
> lambda, perhaps even *should have* used lambda, but you intentionally
> went *out of your way* (i.e. made the job harder than it needed to be) to
> avoid it, just to slavishly ape the BDFL.
No, no, no, not at all. I went out-of-my-way to understand how inner
functions could do everything lambda does. I use inner functions, not
lambda, and everything works well; not to ape the BDFL, but because it
does not appear that lambda is a stable concept, and because I want
other people "in the normal" category to be able to support or at least
read my code.
> Thank you for just proving my point for me. Your code would have been
> better, or at least easier, with lambda. Removing it would make the
> language worse, not better.
No. see above.
> lambda was designed to allow you to create anonymous functions
> in an expression, not as a statement. There is *no other way* to do that
> in Python.
Yes, and I agree, and if that were *necessary* we wouldn't be having
this conversation. The point is that there is *no* reason that you must
code your script that way.
> Would you like to discard def as well? No? Why not?
I am not advocating discarding anything. I am suggesting that
lambda is not necessary and might be deprecated without too much
trouble; if the community sees fit. That is all.
Since the name-space and arguably "def" itself is perhaps the most
powerful aspect of python generally (extensibility) than of course the
answer to your question is obvious, and discussing it would be silly.
def is fine, lambda not so much. BUT I'm not demanding anyone
discard it at the moment. Try to remember Aristotle's mean.
marcus
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2014-03-25 01:45 +0000 |
| Message-ID | <5330df9e$0$29994$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #68900 |
On Mon, 24 Mar 2014 14:47:11 -0500, Mark H Harris wrote:
> On 3/24/14 4:49 AM, Steven D'Aprano wrote:
>> There's no doubt that lambda is less-often useful than is the def
>> statement. But not only is it still useful, but there is a continual
>> stream of people asking for Python to make it *more useful* by allowing
>> the body of a lambda to be a full block, not just a single statement.
>> Guido has stated (although I cannot remember where, so cannot paste a
>> link) that he accepts that in principle, so long as somebody comes up
>> with acceptable syntax.
>
> Now, this will seem strange to you, but if lambda were expanded to
> include an entire block, well now, I would know two things:
> 1) python has commitment to lambda
Python has a commitment to lambda. lambda is not going anywhere. There
was some idea chatter five or six years ago about dropping it from the
language. It didn't get dropped, so now it is as much a part of the
language as for-loops, print, classes and import.
> and 2) lambda would become WAY more useful...
Every one agrees that being able to include a full suite of statements in
an expression form would be useful. Unfortunately, due to the constraint
of Python's syntax, it seems to be impossible. People have looked for 20+
years, and nobody has come up with an acceptable syntax.
[...]
>>> Lambda is a problem of confusion for scientists and other
>>> mathematicians (amateur and otherwise) {snip}
>>{snip}
>> But nor should the confusion of somebody who doesn't know the language
>> count for much.
>
> This is the main disagreement between the two of us on this topic.
> It should count for TONS; whole metric TONs. Because someone who
> understands python primarily, and after five years of coding (say me)
> somebody tells (me) to use lambda in a key clause so that my sort will
> work, or work better, or work "their" way; and I have no idea why I need
> this nameless function (after I find out that "that" is what it is!)
Then you don't understand *sorting*. If you don't understand why you need
a key function, the problem is not the syntax used to create the key
function, but your understanding of sort. Time to remove sorting from
Python, yes? No?
It's not lambda that is giving you trouble. That's just syntax. There is
no conceptual difference between:
data.sort(key=lambda item: *magic goes on here*)
and
def key_func(item):
*magic goes on here*
data.sort(key=key_func)
If the first confuses you, so will the second. If you are capable of
learning what the first means, learning the second is no harder.
> Its confusing, and please contrast between complicated. I don't mind
> complicated, or extensive, or even hard, but when something is
> needlessly confusing, then why?
I don't know why you insist it is confusing. Maybe you're just no good at
seeing the correspondence between
lambda x: expression
and
def func(x):
return expression
>> Python's ints don't work exactly the same as ints do in some other
>> languages, nor do Python's strings, nor is Python's object model
>> precisely the same as that of some other languages. I think that it
>> would be a ridiculous idea to discard int, str and the entire object
>> system just because some people are surprised that Python doesn't
>> behave exactly like some other language. I don't think lambda is any
>> different.
>
> Your logic is faulty here. Conceptually python's lambda doesn't
> work as expected, from contexts that define lambda
Python defines lambda too. Why should Python have to bend over to suit
the definition used by other languages? They don't own the concept of
anonymous functions. Anonymous functions are found in all sorts of
languages, with different semantics and different syntax:
Pike: lambda(typ1 para1, typ2, para2, ...) { ... };
Perl: sub { my ($a, $b) = @_; ... }
Smalltalk: [:a :b| ... ]
Haskell: \a b -> ...
Erlang: fun(a, b) -> ... end
Dylan: method(a, b) ... end method
to mention just a few. Ruby even has at least three ways of spelling
lambda, one of which even uses the word lambda:
{|a, b| ... }
lambda {|a, b| ...}
proc {|a, b| ...}
> and where lambda in functional programming is VERY important.
And? Nobody is saying that they have to stop using the term lambda.
Certainly I'm not. I wouldn't be so rude.
> For one thing, why would we
> want to "spell out" the word "lambda". ( \x y -> x + y ) a b ) If
> we're going to use lambda, then use it.
So you don't like the syntax of Python's lambda. That's your prerogative.
But frankly, one thing I dislike about Haskell is that it is too terse.
Why would you use lambda without spelling out explicitly that you are
doing so?
>> Other languages -- not even Lisp -- don't get to be the sole decider as
>> to what counts as an anonymous function. Python's lambda may be
>> limited, but it is a perfectly fine lambda for what it is intended to
>> do.
>
> Is that the same as George W. Bush's "decider" ?
I have no idea why you are mocking my use of the word "decider". It's a
perfectly legitimate word, a standard term in English for someone who
decides. The Oxford dictionary dates it back to sometime between 1670 and
1699, so it is hardly a neologism or one of Junior Bush's malapropisms.
Let me put it another way. Functional programming languages do not get to
be the sole decision-maker of what counts as a legitimate syntax or
semantics for anonymous functions.
> I agree, and so does the link I referenced, for what it was designed
> to do, its powerful; esp if one needs to embed a function in an
> expression; that is what lambda is for.
Right.
>>> Its also confusing to sophisticated users of all stripes who may not
>>> be aware of "lambda" at all.
>>
>> If they're not aware of lambda, how are they confused by it?
>
> See above. They are recommended its use (maybe on this list) and
> they just don't get it; because its unnecessarily confusing.
Then they are aware of lambda.
Confusing in what way? Is it the keyword used? You don't need to know the
background of the term to learn to use it. If non-English speakers can
memorise that you use "class" to define classes, English speakers can
stop being so precious and memorise that "lambda" is used to define a
function in an expression.
'lambda' is just one of those jargon words, like 'tuple', 'iterate',
'boolean', 'closure', ... just learn it, and you'll be fine. If you want
to investigate the background of the word, go right ahead, but it won't
make you a better programmer to know that "boolean" is named after George
Boole, and I still have no idea what the origin of "tuple" is. (And after
15+ years I still want to spell it "turple".)
[...]
> Programming should be a
> liberal art available to everyone in the set of all "normal" educated
> people.
Why should it be? Programming is no more a liberal art than painting is
an offshoot of calculus.
Most "normal" (normal as defined by whom?) educated people have no
interest, no desire, and no aptitude for programming. Most *programmers*
have no aptitude for the rigor of programming -- the world is full of
lousy programmers churning out their 40 lines of buggy VB/PHP/Java/C code
per day but aren't any good at it:
http://www.yacoset.com/Home/signs-that-you-re-a-bad-programmer
http://haacked.com/archive/2007/02/27/Why_Cant_Programmers._Read.aspx/
Programming is a skill, like writing iambic pentameter. Should liberal
arts courses ban the use of iambic pentameter by poets because some
people find it confusing and can't count syllables or tell the difference
between stressed and unstressed? (I know I can't. My wife despairs that I
am so useless at anything like poetry.)
> Some developers (themselves perhaps with degrees Ph.D. in
> mathematics or computer science) forget about the fact that "normal"
> educated people want to leverage their computer (maybe with python) for
> problem solution without having to become a professional computer
> scientist. I am advocating for those people.
So you say. But I think you are actually being terribly condescending and
elitist at the same time. Consider:
(1) People who just want to get the job done, without learning a bunch of
theory, *won't care* how their sort key function is written. They're
looking for a recipe that they can copy and paste, and whether you write
it like this:
data.sort(key=lambda item: item[1])
or like this:
from operator import itemgetter
data.sort(key=itemgetter(1))
or like this:
def sort_key(item):
return item[1]
data.sort(key=sort_key)
*they won't care*. In fact, they'll probably prefer the first version,
with lambda, because it is fewer lines to copy.
And this is okay. Sometimes you've got more important things to do than
understand how every line of your code works, especially for throw-away
code, you just want to use it. It is very elitist to insist that features
that some people don't understand have to go. Do you understand how
import works? I bet you don't. It's so complicated that there are
probably only one or two core developers who really understand it in all
it's glory. You just use it: "import this", and it just works. lambda is
the same.
Sometimes programming is just a means to an end and the programmer just
wants an answer now.
(2) You're concluding that just because somebody is confused by lambda,
they would be better off if lambda was removed. That's horribly
patronising. Have you considered that maybe they will take that as an
opportunity to *learn something new*? That they'll learn how to use
lambda, they may even investigate the theory behind it?
I am especially aggravated by your attack on lambda because I was that
person. I had never heard of lambda calculus. When I first learned
Python, lambda's syntax troubled me for a while. I had to keep looking it
up, until suddenly the penny dropped that the argument list is exactly
the same as the argument list of def. Replace "def name" with "lambda",
drop the brackets, and use a single expression without "return", and
Joan's your Auntie.
But I learned it, and it got me interested in where the name came from,
and I discovered the lambda calculus and decided that while I have every
admiration for the people who fly that high into the rarefied air of
theory, that's not an area I have much interest in. In any case, I am a
better programmer -- or at least a more educated one -- precisely because
Python didn't dumb down, it didn't patronise me, it offered an
"advanced" (huh! not really) feature that I otherwise would never have
been exposed to.
Yes, Python could remove lambda, and take that opportunity away from
others. Python would be a lesser language for it, and Python programmers
will be lesser programmers for it.
Python programmers are some of most widely read programmers around,
compared to the average C or PHP or VB coder. That's because they are
exposed to so many different concepts in the language. Not everyone cares
to learn about them, and that's okay, but they aren't Python's core
audience.
>> You want to remove lambda because it causes confusion. Okay, for the
>> sake of the argument I will agree that lambda is confusing. Do you know
>> what else is confusing?
>
> I don't want to remove anything at this point. I am only suggesting
> that over time the python community might evaluate whether the lambda
> (map, filter, reduce) thing is a language benefit. If so, manet in
> aeternum. Elif, deprecate it and over time phase it out completely. Its
> a community decision of course, and I'm NOT demanding anything.
This discussion was held five years ago. And lambda is still here.
>> Threading is confusing. So is multiprocessing. So are databases.
>> Unicode is confusing. First-class functions are confusing. Recursion is
>> confusing. Closures are confusing. List comprehensions are confusing.
>> What the hell are trampolines? I'm certainly confused by them.
>
> Argument by analogy almost never works. Please don't confuse my word
> "confusing" with your interpretation "complicated". Actually, I do not
> find any of those above mentioned as "confusing,"
Good for you! I mean it, I'm not being sarcastic. But I *know* people
find all those things confusing, because (1) either I found, or still do,
find them confusing, or (2) because I've seen people confused by them.
When I say "confusing", I mean it. I don't mean complicated.
> while I do admit they
> are complicated--even extremely complicated. An intelligent person
> educated in the liberal arts should be able to sit down over time and
> pick-up the concepts in a new area--without--being confused by the
> material or presentation. Lambda is confusing NOT because its
> complicated (because its not) but because 1) it does not work like other
> lambda concepts in functional programming,
Do you really believe that people educated in the liberal arts are
exposed to the lambda calculus? Most MATHEMATICIANS aren't exposed to
lambda calculus.
> and 2) because the syntax
> does not lend itself easily to immediate interpretation (by normal
> people) nor does it lend itself easily to explanation even in the best
> effort.
I think that's just nonsense. Take a one-line function:
def func(args):
return stuff
Remove the "def func", the brackets, and the "return". Move it all to one
line, and stick the magic word "lambda" at the front:
lambda args: stuff
And you're done. That's all there is to it.
Your insistence that lambda is confusing is awfully condescending. People
are not as dumb as you insist, and they are perfectly capable of learning
lambda without a comp sci degree. Like any technical jargon, there is
vocabulary and meaning to learn, but the concept is no more difficult
than ordinary def functions.
--
Steven D'Aprano
http://import-that.dreamwidth.org/
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-03-25 13:17 +1100 |
| Message-ID | <mailman.8482.1395713879.18130.python-list@python.org> |
| In reply to | #68929 |
On Tue, Mar 25, 2014 at 12:45 PM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > Programming is a skill, like writing iambic pentameter. Should liberal > arts courses ban the use of iambic pentameter by poets because some > people find it confusing and can't count syllables or tell the difference > between stressed and unstressed? (I know I can't. My wife despairs that I > am so useless at anything like poetry.) Iambic pentameter is hard. I know, I tried writing eight lines of it for my brother's wedding. (Okay, I was writing *acrostic* iambic pentameter, putting his wife's new surname down the left edge of the page, but still, it's pretty restrictive.) It's much more fun, I reckon, to write paragraphs of text roughly eighty characters across. Prosaic, I know.... ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-03-25 02:06 +0000 |
| Message-ID | <mailman.8481.1395713237.18130.python-list@python.org> |
| In reply to | #68929 |
On 25/03/2014 01:45, Steven D'Aprano wrote: > > (1) People who just want to get the job done, without learning a bunch of > theory, *won't care* how their sort key function is written. They're > looking for a recipe that they can copy and paste, and whether you write > it like this: > > data.sort(key=lambda item: item[1]) > > or like this: > > from operator import itemgetter > data.sort(key=itemgetter(1)) > > or like this: > > def sort_key(item): > return item[1] > data.sort(key=sort_key) > > > *they won't care*. In fact, they'll probably prefer the first version, > with lambda, because it is fewer lines to copy. > I'm firmly in this camp, practicality beats purity and all that. I've used the first and second versions shown above as they happened to be in the recipes I was aquiring, I wouldn't contemplate the third. That's just my mindset, which is what I love about Python, by pure luck it fits me like made to measure clothing. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
[toc] | [prev] | [next] | [standalone]
| From | Mark H Harris <harrismh777@gmail.com> |
|---|---|
| Date | 2014-03-24 22:48 -0500 |
| Message-ID | <lgqu9j$9l1$1@speranza.aioe.org> |
| In reply to | #68929 |
On 3/24/14 8:45 PM, Steven D'Aprano wrote: > Your insistence that lambda is confusing is awfully condescending. People > are not as dumb as you insist, and they are perfectly capable of learning > lambda without a comp sci degree. Like any technical jargon, there is > vocabulary and meaning to learn, but the concept is no more difficult > than ordinary def functions. This is an Ad Hominem. My opinion that lambda is confusing must not be construed to mean condescension; not coming from my pen. I do not insist that people are dumb, nor do I insist that people cannot learn python without a comp sci degree. Pushing those words into my mouth and then beating me up for saying them is, well, ad hominem. What I am insisting is that *many* people, as point of fact, are confused by the python lambda construct particularly when it is embedded within a for x in and the lambda is supposed to capture the value x (as in my previous examples). This say nothing of their intelligence and says nothing about my supposed motive of condescension. (we my judge actions, but not motives) I am advocating for understanding, among all python users--- novice and expert alike. Especially when I find so many experts who want to "know" (like the OP on this thread) and other experts who (like ecumenical councils) cannot agree (also noticed on this thread). I am not seeking over simplification, and I am not seeking to limit the expert in any way; just advocating for Aristotle's mean, whereat we find virtue. marcus
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-03-24 09:58 +0000 |
| Message-ID | <mailman.8443.1395655163.18130.python-list@python.org> |
| In reply to | #68851 |
On 24/03/2014 05:52, Mark H Harris wrote: > > How so? Read Guido's argument above. Another way to answer this > question is that I have been programming with Python for almost a decade > and I've not used lambda. In fact, I have gone out of my way to NOT use > lambda because I am fully aware that the BDFL hates it. Reduce is no > longer in the standard library (although you can import it) and there > are equally good ways to do what lambda was designed for without the > hassle nor confusion. > Where do you get reduce from if it's not in the standard library? As for lambda I've no real interest in it, other than when copying examples where it's used to (say) provide a key function. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
[toc] | [prev] | [next] | [standalone]
| From | Mark H Harris <harrismh777@gmail.com> |
|---|---|
| Date | 2014-03-24 13:58 -0500 |
| Message-ID | <lgpv85$rdq$1@speranza.aioe.org> |
| In reply to | #68860 |
On 3/24/14 4:58 AM, Mark Lawrence wrote:
> Where do you get reduce from if it's not in the standard library?
That was "a" proposal for 3000. Its there, but its not on the
built-ins; ie., you have to import it. The confusion: why reduce, why
not filter, nor map? {rhetorical}
> As for lambda I've no real interest in it, other than when copying examples
> where it's used to (say) provide a key function.
>
This is one of my main points to Steven. In my experience "most" people
do not intend to use lambda for anything; they are trying to sort this
or that and don't quite know how to get the key right and some helpful
somebody gives them a key=lambda yadda yadda . They use it, and it
works, but they are scratching their head saying to themselves, "what it
that, how does it work, how can I understand it and on and on".
That is what we mean by confusing. Or another really great example is
this thread. Somebody asks about a language feature and somebody else
helpfully answers the question by providing them with a similar lambda!!
Its the programmer's equivalent of explanation by reference to a more
complicated analogy; which leaves the OP left with, "Thanks for all the
responses".
marcus
PS You are absolutely right, all the expanding double spaces become
very annoying when viewed on Thunderbird; it is exasperating, genuinely.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-03-24 19:13 +0000 |
| Message-ID | <mailman.8458.1395688415.18130.python-list@python.org> |
| In reply to | #68891 |
On 24/03/2014 18:58, Mark H Harris wrote:
> On 3/24/14 4:58 AM, Mark Lawrence wrote:
>> Where do you get reduce from if it's not in the standard library?
>
> That was "a" proposal for 3000. Its there, but its not on the
> built-ins; ie., you have to import it. The confusion: why reduce, why
> not filter, nor map? {rhetorical}
So it is in the standard library then. And I'm not confused, seeing
this must have been decided years ago as Python 3 was released some five
years ago.
>
>> As for lambda I've no real interest in it, other than when copying
>> examples
>> where it's used to (say) provide a key function.
>>
>
> This is one of my main points to Steven. In my experience "most" people
> do not intend to use lambda for anything; they are trying to sort this
> or that and don't quite know how to get the key right and some helpful
> somebody gives them a key=lambda yadda yadda . They use it, and it
> works, but they are scratching their head saying to themselves, "what it
> that, how does it work, how can I understand it and on and on".
More fool them, I write Python as I let it take away the head
scratching, not add to it. If I wanted to start head scratching maybe
I'd go and investigate what line 247 of gcmodule.c does, but funnily
enough I've never been there, and don't intend starting now.
>
> That is what we mean by confusing. Or another really great example is
> this thread. Somebody asks about a language feature and somebody else
> helpfully answers the question by providing them with a similar lambda!!
One of the joys of this list from my POV, YMMV.
>
> Its the programmer's equivalent of explanation by reference to a more
> complicated analogy; which leaves the OP left with, "Thanks for all the
> responses".
>
> marcus
>
> PS You are absolutely right, all the expanding double spaces become
> very annoying when viewed on Thunderbird; it is exasperating, genuinely.
>
Yep, but like I said the situation has improved, partly thanks to the
guys who improved the words on the wiki showing how to successfuly use
gg. Thanks fellas :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2014-03-24 13:12 -0600 |
| Message-ID | <mailman.8459.1395688754.18130.python-list@python.org> |
| In reply to | #68891 |
On Mon, Mar 24, 2014 at 12:58 PM, Mark H Harris <harrismh777@gmail.com> wrote: > That is what we mean by confusing. Or another really great example is this > thread. Somebody asks about a language feature and somebody else helpfully > answers the question by providing them with a similar lambda!! That is not in fact how the topic of lambda arose in this thread. Rustom Mody brought up the binding behavior in a tangent specifically to complain about it, and that was the first mention of lambda in the thread.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-03-25 06:22 +1100 |
| Message-ID | <mailman.8460.1395688958.18130.python-list@python.org> |
| In reply to | #68891 |
On Tue, Mar 25, 2014 at 5:58 AM, Mark H Harris <harrismh777@gmail.com> wrote:
> Its there, but its not on the built-ins; ie., you have to import it. The
> confusion: why reduce, why not filter, nor map? {rhetorical}
In other languages with those three, and without list/array
comprehensions, I've used filter occasionally and map reasonably
often, but I don't remember the last time I used reduce. Actually,
Pike has special syntax that can take the place of map sometimes, so I
might use filter more often than map in Pike code, because these don't
need explicit map calls:
//Suppose that clients is an array of connected clients on some server
clients->sockets->write("System message: blah blah blah\n");
Indexing an array (the -> is like Python's . as Pike's . is resolved
at compile time) produces an array, effectively mapping the elements
through "lambda x: x->sockets" and ditto for "->write". Calling an
array calls all the non-empty elements in it, with the same
argument(s), and produces an array of return values. (In this case, I
don't care about the return values, which will simply be the number of
bytes written to each socket. If there's a problem, it'll throw an
exception.) Huh. Even with that, and the [*] automap syntax, and such,
I still use map far more often than filter... and filter orders of
magnitude more often than reduce.
Aside: You'll often hear people talking about "map-reduce" with big
data. Python supports that. Look!
>>> map.__reduce__
<method '__reduce__' of 'map' objects>
Oh wait, that's nothing to do with reduce()...
*ducks for cover*
ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2014-03-24 22:58 +0000 |
| Message-ID | <5330b88b$0$29994$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #68896 |
On Tue, 25 Mar 2014 06:22:28 +1100, Chris Angelico wrote: > Aside: You'll often hear people talking about "map-reduce" with big > data. Python supports that. Look! > >>>> map.__reduce__ > <method '__reduce__' of 'map' objects> > > Oh wait, that's nothing to do with reduce()... > > *ducks for cover* Ha ha, very funny :-P http://code.activestate.com/recipes/577676-dirt-simple-mapreduce/ -- Steven D'Aprano http://import-that.dreamwidth.org/
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-03-25 10:07 +1100 |
| Message-ID | <mailman.8469.1395702432.18130.python-list@python.org> |
| In reply to | #68909 |
On Tue, Mar 25, 2014 at 9:58 AM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > On Tue, 25 Mar 2014 06:22:28 +1100, Chris Angelico wrote: > >> Aside: You'll often hear people talking about "map-reduce" with big >> data. Python supports that. Look! >> >>>>> map.__reduce__ >> <method '__reduce__' of 'map' objects> >> >> Oh wait, that's nothing to do with reduce()... >> >> *ducks for cover* > > Ha ha, very funny :-P > > > http://code.activestate.com/recipes/577676-dirt-simple-mapreduce/ That looks like a more serious map/reduce example. Mine came from a double-take when I was looking at help(map) for some reason; there's a __round__ magic method that helps define the round() function, there's __abs__ for abs(), there's __str__ for str()... look, there's a __reduce__ - it must be to help define reduce()! :) ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2014-03-24 21:04 -0400 |
| Message-ID | <mailman.8477.1395709505.18130.python-list@python.org> |
| In reply to | #68909 |
On 3/24/2014 7:07 PM, Chris Angelico wrote: > On Tue, Mar 25, 2014 at 9:58 AM, Steven D'Aprano > <steve+comp.lang.python@pearwood.info> wrote: >> On Tue, 25 Mar 2014 06:22:28 +1100, Chris Angelico wrote: >> >>> Aside: You'll often hear people talking about "map-reduce" with big >>> data. Python supports that. Look! >>> >>>>>> map.__reduce__ >>> <method '__reduce__' of 'map' objects> >>> >>> Oh wait, that's nothing to do with reduce()... >>> >>> *ducks for cover* >> >> Ha ha, very funny :-P >> >> >> http://code.activestate.com/recipes/577676-dirt-simple-mapreduce/ > > That looks like a more serious map/reduce example. Mine came from a > double-take when I was looking at help(map) for some reason; there's a > __round__ magic method that helps define the round() function, there's > __abs__ for abs(), there's __str__ for str()... look, there's a > __reduce__ - it must be to help define reduce()! :) That was my first think also. I believe __pickle__ or __unpickle__ would have been more appropriate. -- Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-03-25 06:45 +1100 |
| Message-ID | <mailman.8463.1395690355.18130.python-list@python.org> |
| In reply to | #68891 |
On Tue, Mar 25, 2014 at 6:13 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
>> That was "a" proposal for 3000. Its there, but its not on the
>> built-ins; ie., you have to import it. The confusion: why reduce, why
>> not filter, nor map? {rhetorical}
>
>
> So it is in the standard library then. And I'm not confused, seeing this
> must have been decided years ago as Python 3 was released some five years
> ago.
Terminology issue, is all. It's not in the builtins, but it is in the
standard library.
ChrisA
[toc] | [prev] | [next] | [standalone]
Page 19 of 21 — ← Prev page 1 … 17 18 [19] 20 21 Next page →
Back to top | Article view | comp.lang.python
csiph-web