From: Eric S. Raymond Date: Mon, 22 Apr 2019 09:00:05 +0000 (-0400) Subject: Document code fragility. X-Git-Tag: 2.4~2 X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=commitdiff_plain;h=7cba20c5b9da3891c216f6ea01f1460a61a7c750 Document code fragility. --- diff --git a/sst.py b/sst.py index 17d85af..763f903 100755 --- a/sst.py +++ b/sst.py @@ -2862,7 +2862,9 @@ def supernova(w): game.iscate = False unschedule(FSCMOVE) unschedule(FSCDBAS) - survivors = filter(lambda w: w != nq, game.state.kcmdr) + # Changing this to [w for w in game.state.kcmdr if w != nq] + # causes regression-test failure + survivors = list(filter(lambda w: w != nq, game.state.kcmdr)) comkills = len(game.state.kcmdr) - len(survivors) game.state.kcmdr = survivors if not game.state.kcmdr: