Code review comment for ~smoser/cloud-init:fix/1677205-eol-on-sshd_config

Revision history for this message
Scott Moser (smoser) wrote :

I think the most obvious implementation of "return True if the list has entries and False otherwise" is in order of most to least obvious:

return len(changed) == 0
return bool(changed)
return True if changed else False

The fact that bool(changed) is "so slow" is unfortunate.

I think I'll go with len(changed) == 0

« Back to merge proposal