From 83c86654060075d21e13192930d89c4adb190b5a Mon Sep 17 00:00:00 2001 From: Junior Date: Mon, 3 Jun 2024 19:27:31 -0400 Subject: [PATCH] Include ocmments about nesting --- Python/026_matchnested.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Python/026_matchnested.py b/Python/026_matchnested.py index 93438e4..1298c66 100644 --- a/Python/026_matchnested.py +++ b/Python/026_matchnested.py @@ -2,6 +2,11 @@ # Note: Python's match implementation was introduced in Python version 3.10 num = None +# Note that this has a nested structure. There is an outer while loop +# which contains an inner try/except block. Structures can be nested +# at nearly infinite complexity, but if the structure gets more than +# a short few nestings it gets confusing to read and functions +# (dicussed later) should probably be used at that point. while num is None: try: num = int(input("Enter a number between 1 and 3: "))