The Imitation Game, part III

The Imitation Game, part III

I'm still listening to the soundtrack. Still living my best life...

A photo from the film "The imitation game" - a character (name unknown) stands next to a quote that says "Sometimes it's the people who no one imagines anything of who do the things that no one can imagine."
A photo from the Imitation Game movie.

What does Python classify as mutable?

"A mutable object refers to various containers in Python that are intended to be changed."

"A list for example has append and remove operations that change the elements of the list."

"Sets and dictionaries are also two other mutable objects in Python AS THEY CAN BE CHANGED ON THE FLY". 

"Some objects in Python are not mutable, and THEREFORE ARE OKAY TO BE USED AS DEFAULT ARGUMENTS".

From the official documentation

"Default parameter values are evaluated from left to right when a function definition is executed. This means that the expression is evaluated once, when the function is defined, and that the same "pre-computed" value is used for each call." 


What on earth does this mean? I don't understand it!!! One thing I learned during my AI in renewable energy research is to not just parrot stuff. I have to write out what I think things mean for myself. Eeeek - ooooh...

What do I think this means

Oh wait Codecademy has some more definitions. 

Let me start with this - phew.

"When we call a function, the default values we provide for parameters are only created oncem abd used for each subsequent calls of the function.

And now they introduce "None". But my brain is overwhelmed. I need to get not too bogged down with stuff and not too stuck on stuff. I need to keep on going...

I'm sad

I've been trying to buy some raw honey.

Went to the Polish shop and bought some honey for £12.50. In my desperation I wanted it to be raw. Now I'm not sure if it was raw. Oh well - still wondering...

Hold on - I have a test that I know that I can do to check... let me do it after work... 

Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing