From 7d99d319a5b4f4e2d2d4cdbb3a332fa275eede33 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 23 Sep 2023 22:33:59 +0200 Subject: [PATCH] More minor cleanup of the command tutorial page --- .../Part1/Beginner-Tutorial-Adding-Commands.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Adding-Commands.md b/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Adding-Commands.md index 8a166c32af..40f5e20198 100644 --- a/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Adding-Commands.md +++ b/docs/source/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Adding-Commands.md @@ -349,17 +349,15 @@ The full form of the if statement is else: ... -There can be any number of `elifs` to mark when different branches of the code should run. If -the `else` condition is given, it will run if none of the other conditions was truthy. In Python -the `if..elif..else` structure also serves the same function as `case` in some other languages. +There can be any number of `elifs` to mark when different branches of the code should run. If `else` is provided, it will run if none of the other conditions were truthy. ``` - **Line 15** has our first _conditional_, an `if` statement. This is written on the form `if :` and only if that condition is 'truthy' will the indented code block under the `if` statement run. To learn what is truthy in Python it's usually easier to learn what is "falsy": - `False` - this is a reserved boolean word in Python. The opposite is `True`. - `None` - another reserved word. This represents nothing, a null-result or value. - `0` or `0.0` - - The empty string `""` or `''` or `""""""` or `''''''` - - Empty _iterables_ we haven't seen yet, like empty lists `[]`, empty tuples `()` and empty dicts `{}`. + - The empty strings `""`, `''`, or empty triple-strings like `""""""`, `''''''` + - Empty _iterables_ we haven't used yet, like empty lists `[]`, empty tuples `()` and empty dicts `{}`. - Everything else is "truthy". - **Line 16**'s condition is `not args`. The `not` _inverses_ the result, so if `args` is the empty string (falsy), the whole conditional becomes truthy. Let's continue in the code: