3 ms·
asserts are stripped out when python is run in optimized mode. Not to mention sprinkling them around your code is infuriating for people dealing with your code
by jnoller 17y ago
asserts are stripped out when python is run in optimized mode. Not to mention sprinkling them around your code is infuriating for people dealing with your code :) I'd also point you to the links to guido's writeup I put in the post, I agree: it changes the language too much to be a positive net gain.
- silentbicycle 17y ago> sprinkling them around your code is infuriating for people dealing with your code Would this necessarily be any less true of static type annotations, though? And as for them being stripped out, yes - it's for making debugging easier, not performance.