Gui Commits

Share this post

Organize your Python code

guicommits.substack.com

Organize your Python code

Gui Commits
Jul 7, 2022
Share this post

Organize your Python code

guicommits.substack.com

🐍 New Posts

Everything too flexible enhances the odds of bad decisions. I'm going to share my experiences with naming and structuring stuff in Python.

Changes are shown with examples: ExceptionGroup, better errors, Exception add_note, new type hints, StrEnum, and more!

Reminder to review some Python like a PRO posts! All projects mentioned are real, and all concepts were somewhat applied to them with a few modifications (so I don't get sued)

🐦 Python Tips

Twitter avatar for @guilatrova
Gui Latrova @guilatrova
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? https://t.co/6Hxau3k1yK
Image
9:27 PM ∙ Jan 18, 2023
Twitter avatar for @guilatrova
Gui Latrova @guilatrova
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 😉 https://t.co/FLPMRFPNQT
Image
9:27 PM ∙ Jan 18, 2023
Twitter avatar for @guilatrova
Gui Latrova @guilatrova
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 1/10 https://t.co/TOg3GPtunN
Image
9:27 PM ∙ Jan 18, 2023
Share this post

Organize your Python code

guicommits.substack.com
Comments
TopNew

No posts

Ready for more?

© 2023 Substack Inc
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing