this post was submitted on 13 Jul 2024
62 points (98.4% liked)
technology
23313 readers
151 users here now
On the road to fully automated luxury gay space communism.
Spreading Linux propaganda since 2020
Rules:
- 1. Obviously abide by the sitewide code of conduct.
Bigotry will be met with an immediate ban
- 2. This community is about technology. Offtopic is permitted as long as it is kept in the comment sections
- 3. Although this is not /c/libre, FOSS related posting is tolerated, and even welcome in the case of effort posts
- 4. We believe technology should be liberating. As such, avoid promoting proprietary and/or bourgeois technology
- 5. Explanatory posts to correct the potential mistakes a comrade made in a post of their own are allowed, as long as they remain respectful
- 6. No crypto (Bitcoin, NFT, etc.) speculation, unless it is purely informative and not too cringe
- 7. Absolutely no tech bro shit. If you have a good opinion of Silicon Valley billionaires please manifest yourself so we can ban you.
founded 4 years ago
MODERATORS
It's funny how Python spent the past like 6 years developing the type hinting system (which is a massive improvement from no typing don't get me wrong) only to start re-introducing duck typing again with the Protocols.
The one thing I'll always love about it is the ability to override builtins and do dumb things like call 'sum(cats)' where cats is a list of cat objects and have it like print out meow to the terminal for each cat in the list.
Shit like that makes it perfect for internal tools.
At some point I'm just gonna give up and do
Try:
Entire fucking program
Except:
Print("error: something went wrong")
Even better is to create a decorator and just wrap the offending functions:
Or if you want to attempt to salvage it: