Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: What is a function parameter =[] for? Date: Sun, 22 Nov 2015 14:35:27 +0200 Organization: A noiseless patient Spider Lines: 24 Message-ID: <87poz29pps.fsf@elektro.pacujo.net> References: <564dbe6b$0$1610$c3e8da3$5496439d@news.astraweb.com> <564df258$0$1604$c3e8da3$5496439d@news.astraweb.com> <564e71f6$0$1619$c3e8da3$5496439d@news.astraweb.com> <877flcrh26.fsf@elektro.pacujo.net> <565193a1$0$1593$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="9913"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+J7f/1SR/5bqgmtOMRwss7" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:/+FL10xLCBqY/qCx83pB3tv2IZo= sha1:ylZjZDdYGF+H2Uf/rbYVdYi3Hfo= Xref: csiph.com comp.lang.python:99236 Steven D'Aprano : > 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