Discover and read the best of Twitter Threads about #prod

Most recents (2)

Mm. Let's talk about this. I use this as one of my examples in my "WTF Python" introductory lecture...the first lecture I do in my Python Programming class.

I'll start with what's happening, move on to how to avoid it, then finish with when to use it.

1/
First, a plug for another thread: if the idea of a "WTF Python Lecture" is intriguing to you, here's a thread where I talked about why I do that lecture!

So now, let's talk about what's happening in the above code snippet.

Python evaluates default arguments when it places the DEFINITION of the function into the environment. Not when it RUNS that function. So the default arguments keep the id they had at function definition time.

No problem when your defaults are immutable. But a list is mutable.
Read 17 tweets
There's been a fair amount of #PROD news flying about recently.

So I thought it might be helpful to share some stuff from our recent Advised Platform Guide (langcatfinancial.co.uk/product/the-va…) looking at what PROD says and what it means.

Hope you find it helpful.
What PROD says and what PROD means (part 1).
What PROD says and what PROD means (part 2).
Read 8 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!