copacetic to General Programming Discussion@lemmy.mlEnglish · 1 year agoThe best Python feature you cannot usewww.bitecode.devexternal-linkmessage-square2fedilinkarrow-up13arrow-down10
arrow-up13arrow-down1external-linkThe best Python feature you cannot usewww.bitecode.devcopacetic to General Programming Discussion@lemmy.mlEnglish · 1 year agomessage-square2fedilink
minus-squareheeplr@feddit.delinkfedilinkEnglisharrow-up2·edit-21 year agoTL;DR Python optimizes “assert” statements out with -O or PYTHONOPTIMIZE set and some users seem to use it for stuff critical in production instead of raising cheaper Exceptions.
TL;DR
Python optimizes “assert” statements out with
-O
orPYTHONOPTIMIZE
set and some users seem to use it for stuff critical in production instead of raising cheaper Exceptions.