From 717ec38a5c1e4832c3f50bac40d600b50fcd05ed Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 8 Feb 2003 02:12:43 +0000 Subject: [PATCH] Add 'when' variant. --- pep-0308.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pep-0308.txt b/pep-0308.txt index d11404129..b71fe50a5 100644 --- a/pep-0308.txt +++ b/pep-0308.txt @@ -153,6 +153,18 @@ Variations to several people. They all thought that if C was false, it would leave x unchanged. So don't even think about this one! + --- + + Another variant proposes to use 'when' instead of 'if': + + when else + + I don't see the advantage of 'when' over 'if'; it adds a new + keyword which is a major extra hurdle to introduce this. I think + that using a different keyword suggests that the semantics are + different than those of an 'if' statement; but they really aren't + (only the syntax is different). + Copyright