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


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

What is a function parameter =[] for?

Started byfl <rxjwg98@gmail.com>
First post2015-11-18 13:08 -0800
Last post2015-11-25 03:11 +1100
Articles 20 on this page of 198 — 24 participants

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


Contents

  What is a function parameter =[] for? fl <rxjwg98@gmail.com> - 2015-11-18 13:08 -0800
    Re: What is a function parameter =[] for? John Gordon <gordon@panix.com> - 2015-11-18 22:05 +0000
    Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-18 15:11 -0700
      Re: What is a function parameter =[] for? Grant Edwards <invalid@invalid.invalid> - 2015-11-18 22:33 +0000
      Re: What is a function parameter =[] for? fl <rxjwg98@gmail.com> - 2015-11-18 14:38 -0800
        Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-18 15:47 -0700
        Re: What is a function parameter =[] for? fl <rxjwg98@gmail.com> - 2015-11-18 14:48 -0800
      Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-18 23:14 +0000
        Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-19 10:22 +1100
          Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-19 01:41 +0000
            Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-19 12:59 +1100
              Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-19 11:41 +0000
                Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-19 22:58 +1100
                Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-19 23:45 +1100
                  Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-19 08:42 -0700
                    Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-22 14:58 +1100
                  Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 13:38 +0100
                    Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-25 04:29 +1100
            Re: What is a function parameter =[] for? Ben Finney <ben+python@benfinney.id.au> - 2015-11-19 13:08 +1100
            Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-19 13:15 +1100
        Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-18 17:02 -0700
        Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-19 11:14 +1100
          Re: What is a function parameter =[] for? fl <rxjwg98@gmail.com> - 2015-11-18 16:34 -0800
            Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-18 17:52 -0700
            Re: What is a function parameter =[] for? MRAB <python@mrabarnett.plus.com> - 2015-11-19 01:02 +0000
            Re: What is a function parameter =[] for? Ben Finney <ben+python@benfinney.id.au> - 2015-11-19 12:26 +1100
            Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-19 22:38 +1100
        Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-19 23:19 +1100
          Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-19 13:19 +0000
            Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-20 00:45 +1100
            Re: What is a function parameter =[] for? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-19 09:05 -0500
            Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-20 03:01 +1100
              Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-20 04:30 +1100
              Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-19 17:30 +0000
                Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-20 04:45 +1100
                  Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-19 18:19 +0000
                    Re: What is a function parameter =[] for? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-19 18:26 +0000
                      Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-19 18:50 +0000
                        Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-20 06:09 +1100
                          Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-19 19:48 +0000
                            Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-20 06:58 +1100
                        Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-20 11:26 +1100
                          Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-19 16:36 -0800
                            Re: What is a function parameter =[] for? Laura Creighton <lac@openend.se> - 2015-11-20 02:00 +0100
                          Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-19 17:59 -0700
                    Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-19 20:39 +0200
                    Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-19 11:42 -0700
                    Re: What is a function parameter =[] for? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-11-19 18:44 +0000
                    Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-20 06:19 +1100
                      Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-19 21:21 +0000
                        Re: What is a function parameter =[] for? Michael Torrie <torriem@gmail.com> - 2015-11-19 15:55 -0700
                          Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-20 00:11 +0000
                            Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-19 16:27 -0800
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 14:43 +0100
                              Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-25 01:00 +1100
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 15:24 +0100
                              Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-25 01:34 +1100
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 16:01 +0100
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 16:03 +0100
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 16:12 +0100
                              Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-25 02:17 +1100
                                Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-25 04:54 +1100
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 16:46 +0100
                              Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-25 02:48 +1100
                              Re: What is a function parameter =[] for? Random832 <random832@fastmail.com> - 2015-11-24 16:28 +0000
                              Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-25 03:38 +1100
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 17:41 +0100
                              Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-24 09:56 -0700
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 18:32 +0100
                              Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-24 10:53 -0700
                              Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-24 11:04 -0700
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 19:45 +0100
                                Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-24 10:54 -0800
                              Re: What is a function parameter =[] for? Random832 <random832@fastmail.com> - 2015-11-24 19:00 +0000
                                Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-25 11:34 +1100
                              Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-24 12:15 -0700
                              Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-24 12:15 -0700
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 21:54 +0100
                                Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-24 21:14 +0000
                                  Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 22:25 +0100
                                    Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-25 11:36 +1100
                                      Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-25 11:56 +1100
                                      Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-25 10:56 +0100
                                        Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-26 04:40 +1100
                                          Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-25 19:27 +0100
                                            Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-26 11:10 +1100
                                          Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-25 13:39 -0700
                                          Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-25 22:05 +0100
                                          Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-26 09:06 +1100
                                          Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-25 15:38 -0700
                                          Re: What is a function parameter =[] for? Alan Bawden <alan@csail.mit.edu> - 2015-11-25 21:08 -0500
                                            Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-26 13:25 +1100
                                              Re: What is a function parameter =[] for? Alan Bawden <alan@csail.mit.edu> - 2015-11-25 23:27 -0500
                                                Re: What is a function parameter =[] for? Dave Farrance <df@see.replyto.invalid> - 2015-11-26 10:34 +0000
                                                  Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-26 12:58 +0200
                                                    Re: What is a function parameter =[] for? Dave Farrance <df@see.replyto.invalid> - 2015-11-26 11:12 +0000
                                                      Object identity has no necessary connection to memory location (was: What is a function parameter =[] for?) Ben Finney <ben+python@benfinney.id.au> - 2015-11-26 22:24 +1100
                                                        Re: Object identity has no necessary connection to memory location (was: What is a function parameter =[] for?) Dave Farrance <df@see.replyto.invalid> - 2015-11-26 11:50 +0000
                                                          Re: Object identity has no necessary connection to memory location Ben Finney <ben+python@benfinney.id.au> - 2015-11-27 07:00 +1100
                                                            Re: Object identity has no necessary connection to memory location Steven D'Aprano <steve@pearwood.info> - 2015-11-27 13:17 +1100
                                                          Re: Object identity has no necessary connection to memory location Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-26 21:44 +0000
                                                      Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-26 22:24 +1100
                                                      Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-26 13:27 +0200
                                                      Re: Object identity has no necessary connection to memory location (was: What is a function parameter =[] for?) Chris Angelico <rosuav@gmail.com> - 2015-11-26 22:49 +1100
                                                      Re: Object identity has no necessary connection to memory location Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-26 13:04 +0100
                                                  Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-27 12:34 +1100
                                                    Re: What is a function parameter =[] for? Ben Finney <ben+python@benfinney.id.au> - 2015-11-27 12:40 +1100
                                                      Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-27 13:44 +1100
                                                        Re: What is a function parameter =[] for? MRAB <python@mrabarnett.plus.com> - 2015-11-27 02:56 +0000
                                                          Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-27 23:57 +1100
                                                            Re: What is a function parameter =[] for? Laura Creighton <lac@openend.se> - 2015-11-27 14:24 +0100
                                                            Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-28 00:29 +1100
                                                        Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-27 14:06 +1100
                                                        Re: What is a function parameter =[] for? Ben Finney <ben+python@benfinney.id.au> - 2015-11-27 15:56 +1100
                                                    Re: What is a function parameter =[] for? Random832 <random832@fastmail.com> - 2015-11-26 23:33 -0500
                                            Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-25 19:46 -0700
                                            Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-26 14:02 +1100
                                          Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-26 09:15 +0100
                              Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-24 14:33 -0700
                              Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-25 09:09 +1100
                    Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-19 12:25 -0700
                Re: What is a function parameter =[] for? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-19 18:20 +0000
                Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-20 12:05 +1100
                  Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-20 11:59 +0000
                    Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-20 04:12 -0800
                      Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-20 12:39 +0000
                        Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-21 00:04 +1100
                        Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-20 05:30 -0800
                        Re: What is a function parameter =[] for? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-20 08:34 -0500
                        Re: What is a function parameter =[] for? Random832 <random832@fastmail.com> - 2015-11-20 14:32 +0000
                        Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-20 09:18 -0700
                        Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-22 23:01 +1100
                        Re: What is a function parameter =[] for? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-11-23 12:30 +1300
                        Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 15:38 +0100
                      Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 15:34 +0100
                        Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-24 06:50 -0800
                      Re: What is a function parameter =[] for? Terry Reedy <tjreedy@udel.edu> - 2015-11-24 12:46 -0500
                      Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 19:27 +0100
                    Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-20 14:28 +0200
                      Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-20 12:53 +0000
                        Re: What is a function parameter =[] for? Random832 <random832@fastmail.com> - 2015-11-20 14:35 +0000
                        Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-22 21:06 +1100
                          Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-22 14:35 +0200
                      Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-20 09:16 -0700
                        Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-20 18:31 +0200
                          Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-21 03:37 +1100
                          Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-20 09:39 -0700
                      Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-21 03:24 +1100
                      Re: What is a function parameter =[] for? Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-20 09:29 -0700
                        Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-20 18:41 +0200
                      Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-21 03:36 +1100
                    Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-22 14:43 +1100
                      Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-22 13:21 +0000
                        Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-22 14:28 +0000
                        Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-23 10:44 +1100
                          Re: What is a function parameter =[] for? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-23 00:04 +0000
                            Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-23 00:37 +0000
                              Re: What is a function parameter =[] for? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-23 11:32 +0000
                                Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-23 04:05 -0800
                              Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-23 14:23 +0200
                          Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-23 11:20 +1100
                      Re: What is a function parameter =[] for? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-11-23 12:43 +1300
                        Re: What is a function parameter =[] for? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-11-23 18:47 +1100
                          Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-23 10:40 +0000
                            Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-24 00:58 +1100
                              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 15:58 +0100
                                Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-25 04:56 +1100
                  Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 15:18 +0100
                Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 14:48 +0100
        Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 12:36 +0100
        Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-24 23:07 +1100
        Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 13:48 +0100
          Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-24 14:57 +0200
            Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-24 06:18 -0800
              Re: What is a function parameter =[] for? BartC <bc@freeuk.com> - 2015-11-24 14:43 +0000
                Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-25 01:54 +1100
              Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-24 16:10 +0100
                Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-24 07:27 -0800
                  Re: What is a function parameter =[] for? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-11-24 17:25 +0000
                    Re: What is a function parameter =[] for? Ned Batchelder <ned@nedbatchelder.com> - 2015-11-24 09:35 -0800
                      Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-24 20:13 +0200
                        Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-25 05:33 +1100
                          Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-24 21:17 +0200
              Re: What is a function parameter =[] for? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-24 11:27 -0500
              Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-25 11:39 +1100
                Re: What is a function parameter =[] for? Laura Creighton <lac@openend.se> - 2015-11-25 01:55 +0100
                A name refers to an object, an object has a value, equality compares values (was: What is a function parameter =[] for?) Ben Finney <ben+python@benfinney.id.au> - 2015-11-25 13:17 +1100
                  Re: A name refers to an object, an object has a value, equality compares values Marko Rauhamaa <marko@pacujo.net> - 2015-11-25 08:44 +0200
                    Re: A name refers to an object, an object has a value, equality compares values Chris Angelico <rosuav@gmail.com> - 2015-11-25 19:27 +1100
                Re: What is a function parameter =[] for? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-11-25 10:36 +0100
                  Re: What is a function parameter =[] for? Jussi Piitulainen <harvest@should.be.invalid> - 2015-11-25 13:39 +0200
                    Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-25 14:48 +0200
                      Re: What is a function parameter =[] for? Chris Angelico <rosuav@gmail.com> - 2015-11-26 00:50 +1100
                        Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-25 16:08 +0200
                      Re: What is a function parameter =[] for? Jussi Piitulainen <harvest@should.be.invalid> - 2015-11-25 17:13 +0200
                        Re: What is a function parameter =[] for? Marko Rauhamaa <marko@pacujo.net> - 2015-11-25 18:44 +0200
                          Re: What is a function parameter =[] for? Jussi Piitulainen <harvest@should.be.invalid> - 2015-11-25 20:30 +0200
            Re: What is a function parameter =[] for? Steven D'Aprano <steve@pearwood.info> - 2015-11-25 03:11 +1100

Page 8 of 10 — ← Prev page 1 … 6 7 [8] 9 10  Next page →


#99154

FromRandom832 <random832@fastmail.com>
Date2015-11-20 14:35 +0000
Message-ID<mailman.520.1448030478.16136.python-list@python.org>
In reply to#99142
On 2015-11-20, BartC <bc@freeuk.com> wrote:
> Finally, a down-to-earth example. Here it probably doesn't matter at 
> what point 'global_database' gets bound. You know it will always refer 
> to the current state of global_database, and you know that it is a data 
> structure external to the function even if it is updated from inside.
>
> That is a bit different from an empty list that later is not empty.

Why is it different? The only difference is that you're thinking of it as "this
particular database" rather than "a database containing this particular data",
but I'd argue you can say the same for the list.

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


#99234

FromSteven D'Aprano <steve@pearwood.info>
Date2015-11-22 21:06 +1100
Message-ID<565193a1$0$1593$c3e8da3$5496439d@news.astraweb.com>
In reply to#99142
On Fri, 20 Nov 2015 11:53 pm, BartC wrote:

> On 20/11/2015 12:28, Marko Rauhamaa wrote:
>> Even more appropriately, you may expressly want a mutable, singleton
>> object to be the default:
>>
>>     def initiate_query(query, database=global_database):
> 
> Finally, a down-to-earth example. 

Really? Astonishing. To me, the Ackermann's function is a straight-forward,
simple example. It is, after all, a pure mathematical function in the true
sense: it has no side-effects, it takes some arguments, and returns a
result. (Of course, the Python implementation I gave has the side-effect of
keeping a cache of past results, but that's just an implementation detail.)

Whereas this initiate_query example is the opposite of straight-forward. It
involves a database, which means side-effects. The very opposite of a pure
function. Besides, I've never written database code in my life, which makes
it weird and exotic to me. (If lambda is exotic to you because your
personal experience happens to have avoided that area, databases are
equally exotic to me for the same reason.

The lesson here is: programming covers a HUGE range of topics. Don't assume
that the blind-spots in your experience don't exist or aren't important,
because they will be to someone. What's exotic to you is boring and
common-place to somebody else, and vice versa.



> Here it probably doesn't matter at 
> what point 'global_database' gets bound. You know it will always refer
> to the current state of global_database, 

No. You've got that completely backwards.

With early binding semantics (or "early evaluation" if you prefer), the
default object will be the value of global_data at the time the function
declaration runs. Subsequent rebindings of the global variable will not
effect the default object one iota, and you will always know that the
default for database will always be the same thing, whatever it was when
you first defined the function:


global_database = DB("abc")
def initiate_query(query, database=global_database):
    ...

global_database = DB("xyz")

initiate_query(query)  # here, the database used is "abc", not "xyz"


But with late binding, or "late evaluation", the opposite is the case: when
you finally call initiate_query, the database used will be "xyz". *This*
time. Next time, it could be something else: or even nothing at all, if the
global variable has been deleted.




-- 
Steven

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


#99236

FromMarko Rauhamaa <marko@pacujo.net>
Date2015-11-22 14:35 +0200
Message-ID<87poz29pps.fsf@elektro.pacujo.net>
In reply to#99234
Steven D'Aprano <steve@pearwood.info>:

> Really? Astonishing. To me, the Ackermann's function is a
> straight-forward, simple example.

I must admit I have not once in my life written an implementation of the
Ackermann function.

> Whereas this initiate_query example is the opposite of
> straight-forward. It involves a database, which means side-effects.

Again, I must hang my head and confess that I have written quite many
functions with side effects.

> (If lambda is exotic to you because your personal experience happens
> to have avoided that area, databases are equally exotic to me for the
> same reason.

Lambdas are less exotic than layman programmers might think. You may
never need a lambda in Python but you will need to master closures and
inner classes.


Marko

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


#99161

FromIan Kelly <ian.g.kelly@gmail.com>
Date2015-11-20 09:16 -0700
Message-ID<mailman.4.1448036255.2291.python-list@python.org>
In reply to#99140
On Fri, Nov 20, 2015 at 5:28 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
> The Ackermann function really is an esoteric example, but the other
> example that has been discussed here can make practical use of the
> default-value semantics:
>
>    [ lambda x: i * x for i in range(4) ]
>
> which is salvaged with a default value:
>
>    [ lambda x, i=i: i * x for i in range(4) ]
>
> or, more hygienically:
>
>    [ (lambda i=i: lambda x: i * x)() for i in range(4) ]

Note that this last version could be rewritten as:

    [ (lambda i: lambda x: i * x)(i) for i in range(4) ]

At which point the default value semantics are no longer needed.

> One could argue that you should always use a sentinel object for default
> values. That also allows you to distinguish between omitted values and
> default values:
>
>    def asklist(caption, data, n=omitted, rows=omitted, width=omitted,
>                flags=omitted, buttons=omitted, tablist=omitted,
>                heading=omitted):
>
> but that would be rather pedantic in most circumstances.

I think that would be bad design; in general, you shouldn't *need* to
distinguish whether the value was omitted, because it should always be
possible to explicitly pass the default value.

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


#99165

FromMarko Rauhamaa <marko@pacujo.net>
Date2015-11-20 18:31 +0200
Message-ID<87vb8wd43t.fsf@elektro.pacujo.net>
In reply to#99161
Ian Kelly <ian.g.kelly@gmail.com>:

> On Fri, Nov 20, 2015 at 5:28 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
>> One could argue that you should always use a sentinel object for
>> default values. That also allows you to distinguish between omitted
>> values and default values:
>>
>>    def asklist(caption, data, n=omitted, rows=omitted, width=omitted,
>>                flags=omitted, buttons=omitted, tablist=omitted,
>>                heading=omitted):
>>
>> but that would be rather pedantic in most circumstances.
>
> I think that would be bad design; in general, you shouldn't *need* to
> distinguish whether the value was omitted, because it should always be
> possible to explicitly pass the default value.

Consider the mutator pattern:

    def name(self, value=omitted):
        if value is omitted:
            return self._name
        self._name = value

    <URL: https://en.wikipedia.org/wiki/Mutator_method#C.2B.2B_example>


Marko

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


#99167

FromChris Angelico <rosuav@gmail.com>
Date2015-11-21 03:37 +1100
Message-ID<mailman.9.1448037434.2291.python-list@python.org>
In reply to#99165
On Sat, Nov 21, 2015 at 3:31 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Consider the mutator pattern:
>
>     def name(self, value=omitted):
>         if value is omitted:
>             return self._name
>         self._name = value
>
>     <URL: https://en.wikipedia.org/wiki/Mutator_method#C.2B.2B_example>

That should DEFINITELY be two functions.

Or just an attribute.

ChrisA

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


#99168

FromIan Kelly <ian.g.kelly@gmail.com>
Date2015-11-20 09:39 -0700
Message-ID<mailman.10.1448037594.2291.python-list@python.org>
In reply to#99165
On Fri, Nov 20, 2015 at 9:31 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Ian Kelly <ian.g.kelly@gmail.com>:
>
>> On Fri, Nov 20, 2015 at 5:28 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
>>> One could argue that you should always use a sentinel object for
>>> default values. That also allows you to distinguish between omitted
>>> values and default values:
>>>
>>>    def asklist(caption, data, n=omitted, rows=omitted, width=omitted,
>>>                flags=omitted, buttons=omitted, tablist=omitted,
>>>                heading=omitted):
>>>
>>> but that would be rather pedantic in most circumstances.
>>
>> I think that would be bad design; in general, you shouldn't *need* to
>> distinguish whether the value was omitted, because it should always be
>> possible to explicitly pass the default value.
>
> Consider the mutator pattern:
>
>     def name(self, value=omitted):
>         if value is omitted:
>             return self._name
>         self._name = value
>
>     <URL: https://en.wikipedia.org/wiki/Mutator_method#C.2B.2B_example>

Why would you ever want to do this in a language with properties?

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


#99163

FromChris Angelico <rosuav@gmail.com>
Date2015-11-21 03:24 +1100
Message-ID<mailman.6.1448036650.2291.python-list@python.org>
In reply to#99140
On Sat, Nov 21, 2015 at 3:16 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
>> One could argue that you should always use a sentinel object for default
>> values. That also allows you to distinguish between omitted values and
>> default values:
>>
>>    def asklist(caption, data, n=omitted, rows=omitted, width=omitted,
>>                flags=omitted, buttons=omitted, tablist=omitted,
>>                heading=omitted):
>>
>> but that would be rather pedantic in most circumstances.
>
> I think that would be bad design; in general, you shouldn't *need* to
> distinguish whether the value was omitted, because it should always be
> possible to explicitly pass the default value.

The cases where that's not true are usually ones that are more like
C++ overloaded functions:

def next(iter):
    return iter.__next__()
def next(iter, default):
    try: return iter.__next__()
    except StopIteration: return default

You cannot have any actual object to represent the default state, for
the same reasons that you can't have __next__ return a magic value to
represent "no more values". That's why, in the proposed semantics for
an explicit late-binding syntax, I compare with *args notation, which
_can_ let you distinguish perfectly.

ChrisA

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


#99164

FromIan Kelly <ian.g.kelly@gmail.com>
Date2015-11-20 09:29 -0700
Message-ID<mailman.7.1448037025.2291.python-list@python.org>
In reply to#99140
On Fri, Nov 20, 2015 at 9:24 AM, Chris Angelico <rosuav@gmail.com> wrote:
> The cases where that's not true are usually ones that are more like
> C++ overloaded functions:
>
> def next(iter):
>     return iter.__next__()
> def next(iter, default):
>     try: return iter.__next__()
>     except StopIteration: return default

IMO the version with the default argument should have a different
name, as it is conceptually a different function.

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


#99169

FromMarko Rauhamaa <marko@pacujo.net>
Date2015-11-20 18:41 +0200
Message-ID<87r3jkd3nd.fsf@elektro.pacujo.net>
In reply to#99164
Ian Kelly <ian.g.kelly@gmail.com>:

> On Fri, Nov 20, 2015 at 9:24 AM, Chris Angelico <rosuav@gmail.com> wrote:
>> The cases where that's not true are usually ones that are more like
>> C++ overloaded functions:
>>
>> def next(iter):
>>     return iter.__next__()
>> def next(iter, default):
>>     try: return iter.__next__()
>>     except StopIteration: return default
>
> IMO the version with the default argument should have a different
> name, as it is conceptually a different function.

I don't necessarily disagree, but consider this function:

   socket.create_connection(address[, timeout[, source_address]])

   <URL: https://docs.python.org/3/library/socket.html?highlight=conne
   ct#socket.create_connection>

It has been implemented:

   _GLOBAL_DEFAULT_TIMEOUT = object()

   def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
                         source_address=None):

which is somewhat inconsistent. Why not:

   def create_connection(address, timeout=None, source_address=None):

or:

   omitted = object()

   def create_connection(address, timeout=omitted,
                         source_address=omitted):

The argument for the former is that neither timeout nor source_address
can meaningfully be None. The argument for the latter is that it follows
a generic pattern that places no assumptions on the legality or
illegality of None as a value.

The chosen implementation allows:

    s.create_connection(address, source_address=None)

but not:

    s.create_connection(address, timeout=None)


Marko

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


#99166

FromChris Angelico <rosuav@gmail.com>
Date2015-11-21 03:36 +1100
Message-ID<mailman.8.1448037392.2291.python-list@python.org>
In reply to#99140
On Sat, Nov 21, 2015 at 3:29 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> On Fri, Nov 20, 2015 at 9:24 AM, Chris Angelico <rosuav@gmail.com> wrote:
>> The cases where that's not true are usually ones that are more like
>> C++ overloaded functions:
>>
>> def next(iter):
>>     return iter.__next__()
>> def next(iter, default):
>>     try: return iter.__next__()
>>     except StopIteration: return default
>
> IMO the version with the default argument should have a different
> name, as it is conceptually a different function.

Which would make it like dict.__getitem__ and dict.get, which leads to
a lot of people using dict.get() because they don't know about
subscripting. And then they mask potential errors because they're
using the version that suppresses them, since they didn't even know
about the other. Not sure that's an improvement. But I do see the
logic in the separation.

ChrisA

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


#99228

FromSteven D'Aprano <steve@pearwood.info>
Date2015-11-22 14:43 +1100
Message-ID<565139f0$0$1598$c3e8da3$5496439d@news.astraweb.com>
In reply to#99138
On Fri, 20 Nov 2015 10:59 pm, BartC wrote:

> On 20/11/2015 01:05, Steven D'Aprano wrote:

>> Here's another use for function defaults, as static storage:
[...]
>> This is a quick and easy way to memoise a function which would otherwise
>> be horribly slow. And it only works because _memo is bound to a mutable
>> object once, and once only.
> 
> We're arguing at cross-purposes then since you are obviously interested
> in these esoteric aspects, 

Memoisation isn't "esoteric", it is a simple, basic and widely-used
technique used to improve performance of otherwise expensive functions.
Quite frankly, to call it such demonstrates a considerable level of
ignorance about basic programming idioms. Not just Python, but general
purpose programming.

Instead of being so judgemental, why don't you take this as an opportunity
to open your mind to new programming styles? The purpose of learning a new
language is to open our minds to new ways of solving problems. If all we
are going to do is bitch and moan that the new language isn't exactly the
same as the old one we already know, we might as well just stick to using
the old one and not even bother learning anything new.


> but all I want to do is avoid remembering a 
> long list of defaults. Here's an example from another language, a 
> function I'm working on at the minute:
[...]
> (Here, however, the language doesn't like you doing in-place
> modification of a parameter unless the '&' is used, in which case you
> wouldn't be able to assign a default value such as () as you can only
> pass l-values.)

It sounds to me like you have implemented something like Pascal's "var"
parameters, is that right? I believe some languages (VB perhaps?) call
them "output parameters".


>> def test(arg=[]):
>>      arg.append(1)
>>      return len(arg)
>>
>>
>> The binding arg=[] is NOT inside the body of the function. Therefore, it
>> is NOT executed repeatedly, but only once.
> 
> OK, so the "=" is misleading if not a lie.

No. Why would you conclude that? If I called the function like so:

    test( [1, 2, 3, 4, 5] )

and got the result 6, would I conclude that the "=" is misleading if not a
lie? After all, the function declaration clearly shows arg being assigned
the value [], so why am I getting 6 as the result instead of 1?

The whole point of parameter default arguments is that they are bound to the
parameter *only* if the parameter otherwise isn't given a value. That's a
separate issue from *when* the default expression is evaluated. It can be
evaluated only once, or it can be evaluated every single time you call the
function. Both are legitimate techniques, both have their uses, and both
have their limitations.


>>>>> That [] doesn't look like an object that could change.
>>>>
>>>> Of course it does.
>>>
>>> You've lost me know.
> 
>> a = []
>> a.append(1)
>>
>> Are you shocked to learn that a is no longer an empty list?
> 
> No. But I would be surprised if, after this point, [] is no longer an
> empty list either!

Of course [] is an empty list. But the question isn't what [] represents, it
is what value `a` has. Since [] creates a list (not a tuple), and lists can
be modified in place, anyone familiar with Python should expect that just
because you see `a = []` somewhere doesn't mean that `a` will always be an
empty list. `a` can change.

(Of course, any variable can change if you re-assign it.)


> No, forget that; by now, I wouldn't be surprised at all!
> 
> (That [] isn't changed is probably thanks to [] being implemented with
> the BUILD_LIST byte-code, which constructs a brand-new empty list each
> time. So the next time [] is used, it will be a different one from the
> one that has just been appended to.

Right. That's not an accident either.

There isn't a single global empty list shared between all Python variables.
There *could be* (but probably isn't) a single global empty tuple, since
tuples are immutable and anything set to the empty tuple must remain the
empty tuple forever (or until re-assigned to something else), so there
would be no harm in having all such variables share the same object. But
lists don't work like that, because they are mutable.


> In my language, a construct such as [10,20,30] is evaluated just once at
> start-up.

I don't understand that explanation. How does that work? Given:

x = [10, 20, 30]
y = [10, 20, 30]


how does your language know what value y has if it doesn't evaluate the
second construct?



-- 
Steven

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


#99238

FromBartC <bc@freeuk.com>
Date2015-11-22 13:21 +0000
Message-ID<n2sfbh$l8f$1@dont-email.me>
In reply to#99228
On 22/11/2015 03:43, Steven D'Aprano wrote:
> On Fri, 20 Nov 2015 10:59 pm, BartC wrote:
>
>> On 20/11/2015 01:05, Steven D'Aprano wrote:
>
>>> Here's another use for function defaults, as static storage:
> [...]
>>> This is a quick and easy way to memoise a function which would otherwise
>>> be horribly slow. And it only works because _memo is bound to a mutable
>>> object once, and once only.
>>
>> We're arguing at cross-purposes then since you are obviously interested
>> in these esoteric aspects,
>
> Memoisation isn't "esoteric", it is a simple, basic and widely-used
> technique used to improve performance of otherwise expensive functions.

Ackermann is esoteric and so is memoisation, or at least the term is.

(I use the Ackermann function frequently, but usually as a benchmark 
measuring how good a language implementation is at function calls, 
especially recursive ones. And how well it copes with large recursion 
depth. Adding memoisation would defeat the purpose!)

But if it's used for static storage, then why not just use static 
storage? That's a simpler and more general concept than memoisation.

If Python's 'default values' are just a device for obtaining local 
static storage which are otherwise not possible, then why not use 
terminology to say so? As I guess it's too late to do anything about the 
syntax.

(Of course it won't be quite the same, as the caller can overwrite the 
local and /private/ 'static' variables at any time, but I suppose that 
would be yet another feature!)

> Quite frankly, to call it such demonstrates a considerable level of
> ignorance about basic programming idioms. Not just Python, but general
> purpose programming.

I've come to learn that basic idioms are best. Especially trying to 
understand someone else's code (or to translate into another language 
with a different set of advanced features). Some people delight in 
pulling out all the stops and using all the advanced features of a 
language to the hilt. With the result being very concise and clever 
code, but completely unreadable.

>> (Here, however, the language doesn't like you doing in-place
>> modification of a parameter unless the '&' is used,

> It sounds to me like you have implemented something like Pascal's "var"
> parameters, is that right? I believe some languages (VB perhaps?) call
> them "output parameters".

(Something like that. Python seems to exclusively to push around 
references to objects. I use a mix of value objects and part-references. 
The & is an indication to use full references. I can also use actual 
pointers, but I'm trying to get away from that.)

>> OK, so the "=" is misleading if not a lie.
>
> No. Why would you conclude that? If I called the function like so:
>
>      test( [1, 2, 3, 4, 5] )
>
> and got the result 6, would I conclude that the "=" is misleading if not a
> lie? After all, the function declaration clearly shows arg being assigned
> the value [], so why am I getting 6 as the result instead of 1?

That's being silly. We all know this is default value syntax. The lie is 
the [] not necessarily being the default value on every call.

> The whole point of parameter default arguments is that they are bound to the
> parameter *only* if the parameter otherwise isn't given a value. That's a
> separate issue from *when* the default expression is evaluated.

No, that is at the heart of matter. And it's not just a question of 
'when' the 'binding' is done, but the fact that, even if we accept that 
the default value is evaluated when the function is defined, that value 
can then subsequently change.

We all know now /why/ it can do so, which is an unfortunate consequence 
of how it's implemented. But you seem very keen to show it in a positive 
light. It's a feature, not a bug!

>> In my language, a construct such as [10,20,30] is evaluated just once at
>> start-up.
>
> I don't understand that explanation. How does that work? Given:
>
> x = [10, 20, 30]
> y = [10, 20, 30]
>
>
> how does your language know what value y has if it doesn't evaluate the
> second construct?

(It generates some start-up code which assigns [10,20,30] to a variable. 
Then that variable is used in place of that particular [10,20,30]. (It 
doesn't combine multiple instances of the same constant list, as that is 
not common. So y would be dealt with separately.)

I think Python already does something along these lines for tuples, 
which cannot change. It means you're executing a simple LOAD instead of 
BUILT_LIST on N values.)

-- 
Bartc

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


#99239

FromBartC <bc@freeuk.com>
Date2015-11-22 14:28 +0000
Message-ID<n2sja5$44m$1@dont-email.me>
In reply to#99238
On 22/11/2015 13:21, BartC wrote:
> On 22/11/2015 03:43, Steven D'Aprano wrote:

>> Quite frankly, to call it such demonstrates a considerable level of
>> ignorance about basic programming idioms. Not just Python, but general
>> purpose programming.
>
> I've come to learn that basic idioms are best.

I may have misunderstood what you meant by 'basic idioms' here. It seems 
we disagree as to what is 'basic'.

-- 
bartc

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


#99248

FromSteven D'Aprano <steve@pearwood.info>
Date2015-11-23 10:44 +1100
Message-ID<5652535a$0$1596$c3e8da3$5496439d@news.astraweb.com>
In reply to#99238
On Mon, 23 Nov 2015 12:21 am, BartC wrote:

> But if it's used for static storage, then why not just use static
> storage? That's a simpler and more general concept than memoisation.

/head-desk

"But if it's used for cooking, why not just cook? That's a simpler and more
general concept than roasting."



-- 
Steven

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


#99249

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-11-23 00:04 +0000
Message-ID<mailman.55.1448237105.2291.python-list@python.org>
In reply to#99248
On 22/11/2015 23:44, Steven D'Aprano wrote:
> On Mon, 23 Nov 2015 12:21 am, BartC wrote:
>
>> But if it's used for static storage, then why not just use static
>> storage? That's a simpler and more general concept than memoisation.
>
> /head-desk
>
> "But if it's used for cooking, why not just cook? That's a simpler and more
> general concept than roasting."
>

What happened to "Please do not feed the trolls"?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


#99252

FromBartC <bc@freeuk.com>
Date2015-11-23 00:37 +0000
Message-ID<n2tn01$ko3$1@dont-email.me>
In reply to#99249
On 23/11/2015 00:04, Mark Lawrence wrote:
> On 22/11/2015 23:44, Steven D'Aprano wrote:
>> On Mon, 23 Nov 2015 12:21 am, BartC wrote:
>>
>>> But if it's used for static storage, then why not just use static
>>> storage? That's a simpler and more general concept than memoisation.
>>
>> /head-desk
>>
>> "But if it's used for cooking, why not just cook? That's a simpler and
>> more
>> general concept than roasting."

With 'it' being a washing machine perhaps? But I'll let this other chap 
have the last word as he puts it across better:

 > Steven D'Aprano wrote:
 >> Memoisation isn't "esoteric", it is a simple, basic and widely-used
 >> technique used to improve performance of otherwise expensive functions.

On 22/11/2015 23:43, Gregory Ewing wrote:

 > That may be true, but I don't think it's a good example
 > of a use for a shared, mutable default value, because
 > it's arguably an *abuse* of the default value mechanism.

> What happened to "Please do not feed the trolls"?

You mean, people with different opinions?

I think I'm done here.

-- 
Bartc


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


#99264

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-11-23 11:32 +0000
Message-ID<mailman.64.1448278522.2291.python-list@python.org>
In reply to#99252
On 23/11/2015 00:37, BartC wrote:
> On 23/11/2015 00:04, Mark Lawrence wrote:
>> On 22/11/2015 23:44, Steven D'Aprano wrote:
>>> On Mon, 23 Nov 2015 12:21 am, BartC wrote:
>>>
>>>> But if it's used for static storage, then why not just use static
>>>> storage? That's a simpler and more general concept than memoisation.
>>>
>>> /head-desk
>>>
>>> "But if it's used for cooking, why not just cook? That's a simpler and
>>> more
>>> general concept than roasting."
>
> With 'it' being a washing machine perhaps? But I'll let this other chap
> have the last word as he puts it across better:
>
>  > Steven D'Aprano wrote:
>  >> Memoisation isn't "esoteric", it is a simple, basic and widely-used
>  >> technique used to improve performance of otherwise expensive functions.
>
> On 22/11/2015 23:43, Gregory Ewing wrote:
>
>  > That may be true, but I don't think it's a good example
>  > of a use for a shared, mutable default value, because
>  > it's arguably an *abuse* of the default value mechanism.
>
>> What happened to "Please do not feed the trolls"?
>
> You mean, people with different opinions?
>
> I think I'm done here.
>

Wow, so there is a God.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


#99267

FromNed Batchelder <ned@nedbatchelder.com>
Date2015-11-23 04:05 -0800
Message-ID<750e8337-ce14-4a72-b016-ab326424965d@googlegroups.com>
In reply to#99264
On Monday, November 23, 2015 at 6:35:35 AM UTC-5, Mark Lawrence wrote:
> On 23/11/2015 00:37, BartC wrote:
> > On 23/11/2015 00:04, Mark Lawrence wrote:
> >> What happened to "Please do not feed the trolls"?
> >
> > You mean, people with different opinions?
> >
> > I think I'm done here.
> >
> 
> Wow, so there is a God.

Mark, you aren't helping.

--Ned.

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


#99269

FromMarko Rauhamaa <marko@pacujo.net>
Date2015-11-23 14:23 +0200
Message-ID<87oaekq502.fsf@elektro.pacujo.net>
In reply to#99252
BartC <bc@freeuk.com>:

> I think I'm done here.

Bart, this is the internet. Just skip the articles you don't find
uplifting.


Marko

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


Page 8 of 10 — ← Prev page 1 … 6 7 [8] 9 10  Next page →

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


csiph-web