>>> result.append('start') Default reason: .. skip: next if(2 > 1) Should not run: >>> result.append('bad 1') >>> result.append('good 1') .. skip: start if(2 > 1, reason='foo') >>> result.append('bad 2') >>> result.append('bad 3') .. skip: end >>> result.append('good 2') Here's a really extreme example of computing the reason from stuff in the namespace: .. skip: next if (True, 'good reason' if result[-1] == 'good 2' else 'bad reason' ) >>> result.append('bad 4')