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…
You get the idea…
…readers love The Python Coding Book
thepythoncodingplace.com/the…
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?
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?
Here’s the link to find all the info. Better still, contact us—we like to talk to you. Always!
thepythoncodingplace.com
35
new page • more Monty…
thepythoncodingplace.com/liv…
1
36
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…
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…
`.__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?
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…
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
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…
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
Can I use pen and paper to count words?
Only joking, I also read The Python Coding Book, after all!
thepythoncodingplace.com/the…
…and indeed I've watched A Python Tale, which also includes this example: thepythoncodingplace.thinkif…
52
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






