In my .vimrc file, I have a key binding for commenting out that inserts double slashes (//) at the start of a line:
.vimrc
//
" the mappi
You can use :map ... to make a local mapping just for the active buffer. This requires that your Vim was compiled with +localmap.
:map ...
+localmap
So you can do something like
autocmd FileType python map ...