looping vertex groups doesn't work

I’m using Blender 2.56 and I’m trying to figure out how you’re supposed to loop vertices in a vertex group of an object (mesh), or if it’s even possible. The methods in the vertex group object suggest it’s iterable (items, keys, values), but when trying to do so, it says it isnt. When calling any of these methods directly, I get this message:

this type doesn’t support IDProperties

How do you get the vertices of a vertex group for a mesh?