What is a function parameter =[] for?
Marko Rauhamaa
marko at pacujo.net
Sun Nov 22 07:35:27 EST 2015
Steven D'Aprano <steve at 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
More information about the Python-list
mailing list