Think about this code:
class Missile(models.Model):
# we can only attack short countries
target = models.CharField(max_length=7)
should_launch = models.BooleanField()
def launch(self):
"""
pass launches the missile
"""
pass
You recently added a new missile:
# add new missile in case we have to attack Merica
# it won't be launched until we set should_launch to True
Missile.objects.create(target="Merica")Then you have a view:
/missile/launch_missiles
with the code: for missile in Missile.objects.filter(should_launch=True):
missile.launch()
You'll have the unexpected behavior of launching that missile you just added.
With the new behavior your missile wouldn't be launched until you told it to. Basically this update has everything to do with the missile above failing this conditional: missile.should_launch is True
Since 'None is not True and None is not False', it is a sensible default for Booleans.