[ prog / sol / mona ]

prog


Help on the Way

10 2022-04-08 14:47

>>9
Like what? Instead of `(if x x y)`? Sure, that is common.

11 2022-04-08 15:06

>>9

Once I tried that in Python and was told not to exploit unintentional features.

I don't do Python, but it doesn't seem to me like an "unintentional feature":

https://docs.python.org/3/reference/expressions.html#boolean-operations
Note that neither and nor or restrict the value and type they return to False and True, but rather return the last evaluated argument. This is sometimes useful, e.g., if s is a string that should be replaced by a default value if it is empty, the expression s or 'foo' yields the desired value.

103


VIP:

do not edit these