I've noticed the same thing -- I wonder if this snippet was removed, or if its presence depends on the language server used (I believe VSCode switched from MS's language server to Pylance by default).
In any case, you can recreate the extension yourself by clicking the menu item Code > Preferences > User Snippets, select python.json, and then enter the following entry:
"Main": {
"prefix": "__main__",
"body": [
"if __name__ == "__main__":",
"${1:pass}"
],
"description": "Insert main block"
}
More info: https://code.visualstudio.com/docs/editor/userdefinedsnippets
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…