Another note, if you are using the new python-occ interface you can set a name for the vertex in the geometry like with any other shape object (solids, faces, edges) and then call it with the syntax Gousheng posted.
This allows for a nicer syntax for example something like this:
Code:
shape.edges["leftboundary"].vertices.Max(Y).name = "special_vertex"
...
u.Set(1, definedon=mesh.BBoundaries("special_vertex"))