I created a Hinge rigid_body_constraint between two geometries.
I see the constraint empty, I select it, and in the Physics tab I see a correct “Hinge” rigid body constraint.
But
bpy.data.objects[constraintemptyname].rigid_body_constraint.type is ‘HINGE’
returns False.
When you call this as an bge script then this is not a bug.
First of all bpy (Blender Python) is not meant to work with the bge (Blender game engine). You have to use the bge API (game engine modules, some standalone modules also working with the bge).