Jason NovingerM to [email protected] • 6 days agoPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comexternal-linkmessage-square53fedilinkarrow-up165cross-posted to: [email protected]
arrow-up165external-linkPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comJason NovingerM to [email protected] • 6 days agomessage-square53fedilinkcross-posted to: [email protected]
minus-square🇦🇺𝕄𝕦𝕟𝕥𝕖𝕕𝕔𝕣𝕠𝕔𝕕𝕚𝕝𝕖linkfedilinkEnglish1•4 days agoUr function args if fucked up should always throw an error that’s the entire point of python type hints
minus-square@[email protected]linkfedilink1•10 hours agotype hints are static, not necessarily runtime. A chaos monkey throws everything at everything to see what breaks. That won’t be caught by perfect type hints, which is merely one tool in the toolbox. and when things break, often hear WAD, works as designed. Or some other nonsense excuse.
Ur function args if fucked up should always throw an error that’s the entire point of python type hints
type hints are static, not necessarily runtime.
A chaos monkey throws everything at everything to see what breaks.
That won’t be caught by perfect type hints, which is merely one tool in the toolbox.
and when things break, often hear WAD, works as designed. Or some other nonsense excuse.