3 ms·
if user_set_delete: logger.info("User set flag to delete file") delete_file() vs if($user_set_delete===True){ log("User set flag to de
by parfe 15y ago
if user_set_delete:
logger.info("User set flag to delete file")
delete_file()
vs
if($user_set_delete===True){
log("User set flag to delete file");
delete_file();
}
"Correct" and "looks good" can have very different consequences. Acting like proper indentation for looks is on the same level as proper indentation for execution is ignoring the real dangers of improperly indented python.
I know copying that php block will not change the execution, no matter how it is formatted vs copying python where I need to guarantee I've got it right. Hence "some overhead".
- headhuntermdk 15y agoActually if user_set.delete: logger.info("User set flag to delete file") delete_file() Becomes: if ($user_set_delete==True){ log("user set flag to delete file") } delete_file();