Monty @ The Python Coding Place (@ThePythonPlace) header
Monty @ The Python Coding Place (@ThePythonPlace) profile picture

I'm Monty, Chief Mischief Officer at The Python Coding Place.

Worldwide
Joined January 2023
Photo by Monty @ The Python Coding Place (@ThePythonPlace)Photo by Monty @ The Python Coding Place (@ThePythonPlace)Photo by Monty @ The Python Coding Place (@ThePythonPlace)Photo by Monty @ The Python Coding Place (@ThePythonPlace)Photo by Monty @ The Python Coding Place (@ThePythonPlace)Photo by Monty @ The Python Coding Place (@ThePythonPlace)Photo by Monty @ The Python Coding Place (@ThePythonPlace)Photo by Monty @ The Python Coding Place (@ThePythonPlace)Photo by Monty @ The Python Coding Place (@ThePythonPlace)Photo by Monty @ The Python Coding Place (@ThePythonPlace)
What's better than a thorough, relaxed, and friendly Python course? 12 of them (plus a bit more, too), all in one bundle, all for just $400 …and yes, you get access to a forum where you can ask questions, too The only risk is in missing out… thepythoncodingplace.thinkif…
1
2
3
231
You get the idea… …readers love The Python Coding Book thepythoncodingplace.com/the…
1
1
344
Monty @ The Python Coding Place retweeted
Your call… There’s • a super-personalised one-to-one 6-month mentoring option $ 4,750 • individual one-to-one sessions $ 125 • a self-led route with access to 60+ hrs of exceptional video courses and a support forum $ 400 Which The Python Coding Place student are you?
1
3
3
222
Your call… There’s • a super-personalised one-to-one 6-month mentoring option $ 4,750 • individual one-to-one sessions $ 125 • a self-led route with access to 60+ hrs of exceptional video courses and a support forum $ 400 Which The Python Coding Place student are you?
1
3
3
222
Here’s the link to find all the info. Better still, contact us—we like to talk to you. Always! thepythoncodingplace.com
35
Monty @ The Python Coding Place retweeted
The meaning of life, the universe, and everything is… …Python Of course! What else could it be.
Replying to @mathsppblog
I've now reached the point where I'm questioning the meaning of life and the universe…
2
343
Monty @ The Python Coding Place retweeted
Replying to @ThePythonPlace
Great to see more and more people enjoying these courses. I had so much fun recording them…
1
39
`.__george__()` In a recent course, a student asked my whether it's possible to create new special methods by using leading and trailing double underscores in the name. No. But you can* define a method with leading and trailing double underscores if you want * you can…but you shouldn't The student's name was George (it still is, technically), so we wrote this dummy class: ``` >>> class SpecialStuff: ... def __george__(self): ... print("There's nothing special to see here!") ... ``` This code "works": ``` >>> stuff = SpecialStuff() >>> stuff.__george__() There's nothing special to see here! ``` So you _can_ define a method with leading and trailing double underscores in its name. But there's nothing special about `.__george__()`. Sorry George, don't take it personally. It's just a normal method. What makes special methods special is not the double underscore syntax–that's just a way to easily identify them. What makes, say, `.__add__()` special is its role within the Python language–Python looks for this method when you use the `+` operator. So, why shouldn't you create methods with leading and trailing double underscores. After all, they look cool? Because you'll confuse everyone else who reads your code. Readability matters. A lot. Someone reading your code might look puzzlingly at the `.__george__()` looks-like-special method. They'll spend hours, days, weeks, years looking for it in the documentation to see what it does behind the scenes in Python… …and do you want to be responsible for these years lost from so many programmers' lives looking for a special method that doesn't exist?
1
1
223
I reckon `.__monty__()` should exist as a valid special method—the specialest of all special methods. Who’s with me on this? Let’s start a petition…
45
Monty @ The Python Coding Place retweeted
What's better than a thorough, relaxed, and friendly Python course? 12 of them (plus a bit more, too), all in one bundle, all for just $400 …and yes, you get access to a forum where you can ask questions, too The only risk is in missing out… thepythoncodingplace.thinkif…
1
2
3
231
No coding knowledge = Little benefit from AI Little coding knowledge = Intermediate benefit from AI Intermediate coding knowledge = Great benefit from AI Great coding knowledge = Superpower-like benefit from AI
1
1
1
1
315
No coding knowledge + The Python Coding Place membership = Intermediate programmer Little coding knowledge + The Python Coding Place membership = Great programmer Intermediate coding knowledge + The Python Coding Place membership = Superpower-like programmer
1
1
193
The meaning of life, the universe, and everything is… …Python Of course! What else could it be.
Replying to @mathsppblog
I've now reached the point where I'm questioning the meaning of life and the universe…
2
343
It's ok, Monty, we've all been there :D
1
1
16
It’s OK, I reached a decisive conclusion. The meaning of life, the universe, and everything is… …Python
1
9
Replying to @ThePythonPlace
Woops, I sent you spiraling down!
1
12
I've now reached the point where I'm questioning the meaning of life and the universe…
1
1
1
356
Replying to @mathsppblog
Hmmm - good point. Good point indeed…
1
1
17
The idea was to highlight that it's not in a group as it's a personalised offer for an individual, but I see your point. Monty will now go to ponder…
1
1
13
Consider this code to find how often words appears in a text: ``` all_words = {} for word in list_of_words: if word in all_words: all_words[word] += 1 else: all_words[word] = 1 ``` Many will react to this with: > "Ah, but you should use ... instead" [With `Counter` being the most common response] But I use this code in my beginners' book and in beginners' courses I teach Why? Because I'm not teaching them how to find words in a text. I'm teaching them how to code, how to think with a programming mindset, how to master the basic tools. This didactic approach happens in all aspects of teaching. Virtually all material children learn at primary school is simplified and "not how I'd do it". A lot of what they learn in secondary school is, too. And there's a reason for that. You need to learn to walk before you can run… So when you see some code "you'd do differently", think about who's the intended audience. Maybe, that's the right code for them!
2
8
340
There's a fundamental rule of Python... That `itertools.tee` breaks! In a couple of hours, I'm sending a deep dive to 11,000+ email subscribers to help them understand how `tee` is able to do what it does! Check the link in my profile to subscribe and to get the deep dive too!
1
1
519
`pairwise`. And then they added it to the std library :D
1
1
20
Working from home today, but here's my obligatory 1st day back at work photo❤️ There's never been a better time to be a Python programmer interested in AI! Python is still the number 1 language used to build AI Agents in. New year, same Pythonic vibes 👩🏾‍💻🐍✨
4
2
1
39
1,581