copacetic@discuss.tchncs.de to General Programming Discussion@lemmy.mlEnglish · 1 year agoThe best Python feature you cannot usewww.bitecode.devexternal-linkmessage-square1fedilinkarrow-up12arrow-down10
arrow-up12arrow-down1external-linkThe best Python feature you cannot usewww.bitecode.devcopacetic@discuss.tchncs.de to General Programming Discussion@lemmy.mlEnglish · 1 year agomessage-square1fedilink
minus-squareheeplr@feddit.delinkfedilinkEnglisharrow-up1·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.