this post was submitted on 24 Apr 2025
1 points (100.0% liked)

Python

7870 readers
1 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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] muntedcrocodile@lemm.ee 0 points 11 months ago (1 children)

I like the exception being raised their is no reason I should be passing in None to the function it means I've fucked up the value of whatever I'm passing in at some point.

[–] logging_strict@programming.dev 0 points 11 months ago (1 children)

Oh no a stray None! Take cover ...

Robust codebase should never fail from a stray None

Chaos testing is specifically geared towards bullet proofing code against unexpected param types including None.

The only exception is for private support function for type specific checking functions. Where it's obviously only for one type ever.

We live in clownworld, i'm a clown and keep the company of shit throwing monkeys.

[–] muntedcrocodile@lemm.ee 0 points 11 months ago

Ur function args if fucked up should always throw an error that's the entire point of python type hints