View profile

Organize your Python code

Organize your Python code
By Guilherme Latrova • Issue #4 • View online
Hi guys!
I decided to write a book on many themes I’ve seen people doing wrong with Python (I previously wrote about two popular posts: Exception Handling and Logging), and there are even more topics that I can’t explore in a regular post format.
This week I’m going to share publicly a draft of the first chapter, about organizing Python code. From time to time I receive questions on how to name things in Python, how to organize them into modules, whether to create functions or classes and so on.
(❤️ P.S. Honest feedback is highly encouraged!)
There’s no silver bullet that answers all these questions, but there are guidelines that can lead to a better organized and less chaotic project.
I hope you enjoy!

🐍 New Posts
Organize Python code like a PRO
Python 3.11 What's New?
🎗️Series: Python like a PRO
🐦 Python Tips
Gui Latrova
Are you lazy like me?

Did you know you can use partial in Python 🐍 to avoid passing down the same args over and over again?
Gui Latrova
Did you ever have to debug variables in Python?

Isn't it boring to type print(f"VAR_NAME = {VAR_NAME}") ? 😪

💁🏻‍♂️ Well, why you don't use the f"{VAR_NAME=}" notation?

See the example and take the final advice 😉
Gui Latrova
Hey, do you know the major changes from 🐍 Python 3.11 (Beta) so far?

Here's a funny/short thread to keep you updated!

✅ Summary

1. Performance improvement
2. Better error messages
3. Exception groups
4. Exception add_note()
5. New type hints
6. New standard module

Did you enjoy this issue?
Guilherme Latrova

I share the latest on 👨‍💻 Software Engineering, 🐍 Python, and my journey on creating content ✍️.

In order to unsubscribe, click here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Powered by Revue