From b47eea68cdde12fdc209aa37976a5465970635aa Mon Sep 17 00:00:00 2001 From: Anthony Dempsey Date: Sun, 17 Nov 2024 16:17:23 +0000 Subject: [PATCH] Update gettingstarted.md to use f-string Python's f-strings are the preferred method of string formatting now. Updated the python code examples to use them instead of .fromat() --- content/manuals/compose/gettingstarted.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/manuals/compose/gettingstarted.md b/content/manuals/compose/gettingstarted.md index 58cbbc26c2..5475e9e113 100644 --- a/content/manuals/compose/gettingstarted.md +++ b/content/manuals/compose/gettingstarted.md @@ -59,7 +59,7 @@ Make sure you have: @app.route('/') def hello(): count = get_hit_count() - return 'Hello World! I have been seen {} times.\n'.format(count) + return f'Hello World! I have been seen {count} times.\n' ``` In this example, `redis` is the hostname of the redis container on the @@ -273,7 +273,7 @@ To see Compose Watch in action: message to `Hello from Docker!`: ```python - return 'Hello from Docker! I have been seen {} times.\n'.format(count) + return f'Hello from Docker! I have been seen {count} times.\n' ``` 2. Refresh the app in your browser. The greeting should be updated, and the