Check out this code:
from maya import cmds as mc
sel = mc.ls(sl=True)#here you get the selected vertex
mc.polyMergeVertex(sel)#Merge those vertex
mc.select(sel)#if you run this you will see that the selected vertex are diferent from the ones you made the merge.
Lets work arround this, you will have the name of the original vertex in the "sel" variable, but after the merge, Maya will rename the vertex of the mesh so they will match your result vertex from the merge and other vertex next to him.
Im not sure why you need something like this but hope it helps.