Late-binding of function defaults (was Re: What is a function parameter =[] for?)

Chris Angelico rosuav at gmail.com
Wed Nov 25 03:32:29 EST 2015


On Wed, Nov 25, 2015 at 7:14 PM, Antoon Pardon
<antoon.pardon at rece.vub.ac.be> wrote:
> What exactly is your point? People's confusions don't disappear
> because you as an expert have a good understanding of what is
> going on and so are no longer confused.
>
> Some aspects in the langauage are easily grasped and other
> aspects tend to create confusion. I see nothing wrong with
> people trying to point out what the cause of this confusion
> could be. You arguing that people shouldn't be confused is
> not helping.

"Oh come on. It's basic arithmetic. You should be able to add 7 and
7... the result's 14!"

"But it's so confusing. Why can't it be 16? It'd be more convenient
for me if it were 16."

"This is just how arithmetic works."

"But it's still confusing!"

At some point, you have to simply accept that this is how the system
works.. or use a different system. (Octal maybe.) If you are
perpetually confused by Python, you need to either learn how Python
works, or use something else.

ChrisA



More information about the Python-list mailing list