this post was submitted on 16 Aug 2023
51 points (100.0% liked)

Python

98 readers
3 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
 

One of my fav Python writeups. I love Python and luckily I get to dictate how it's being written in my job, so I'm forcing types down the through of my colleagues. Saved a bunch of debugging time, so I can waste more time on Lemmy while still getting paid. Good shit

top 4 comments
sorted by: hot top controversial new old
[–] ddnomad@infosec.pub 7 points 1 year ago (2 children)

Type hints are cool. Runtime enforced type hints are cooler.

https://github.com/beartype/beartype

[–] im_orange@discuss.tchncs.de 3 points 1 year ago* (last edited 1 year ago)

Oh my gosh... This project and its readme are amazing. I gotta try this at work tomorrow, I hope my co-workers can bear with me.

Edit: I just found the release notes... I love it

[–] mwguy@infosec.pub 2 points 1 year ago

Thanks for this. I might start to use this. This would allow me to add typing class or function at a time and slowly work my way back.

[–] xurxia@mander.xyz 6 points 1 year ago

I fully agree with the post. Except for a fast prototyping or a short personal script where it could be not necessary, type hint is a must. The subject is not only to guarantee that the program now runs without errors, but it will be still working right in the future too, even after a developer (either the original or other) make changes to the code.