And any reason we need a separate extension for pyw.exe? Can't that be specified in the shebang?
The association specifies the exe to run, that exe then relaunches whatever the shebang specifies. But it's the *initial* executable's console/GUI flag that specifies the behaviour, so we need two launchers and hence two extensions.
You could put pythonw in the shebang of a .py file, but that would open a console window when double clicked. Similarly, putting python in the shebang of a .pyw file will detach the script from the current console when run from the command line.