Temporaly set an Armature to Rest Position i need to do some calculations which only work in Rest pose. So i tried to do:

pose_position = arm.data.pose_position
arm.data.pose_position='REST'    

# Do some calculations on the mesh objects bound to the armature

arm.data.pose_position=pose_position


But this simple idea does not work. 

However, when i select Rest Position from the Blender User Interface before i call my script, then the script creates correct results. So the question is what does pressing the Rest Position Button in addition and how can i do that from Python as well?
You don't need to switch pose_position, because tail, head, matrix and so on are not affected by keyframed poses if you access the Armature data (Object.data.bones[#]).

If you access the pose data however (Object.pose.bones[#]), the properties will change based on the current frame.