I'm running python 3.9.7 and am making a youtube video info viewer / downloader. Without the match statement the code runs fine and doesn't have any errors with concern to missing brackets. An interesting thing is that Atom doesn't show match with any colour in my code, however it seems not to do that in a blank file with only the match anyway.
# A youtube info and downloader
import getpass
from pytube import YouTube
from pathlib import Path
username = getpass.getuser()
downloads_path = str(Path.home() / "Downloads")
# Create video object
link = input("Enter video link (Don't forget https://): ")
video_object = YouTube(link)
# Print info
print(f"Title: {video_object.title}")
print(f"Length: {round(video_object.length / 60, 2)} minutes")
print(f"Views: {round(video_object.views / 1000000, 2)} million")
print(f"Author: {video_object.author}")
# Download
print("Download: (b)est | (w)orst | (a)udio | (e)xit")
download_choice = input(f"{username} $ ")
match download_choice:
case: "b":
video_object.streams.get_highest_resolution().download(downloads_path)
case: "w":
video_object.streams.get_worst_resolution().download(downloads_path)
case: "a":
video_object.streams.get_audio_only().download(downloads_path)
Edit: I'm running it in the terminal