fixed python dictionary usage

better syntax for use of dict, less chance of unhandled collisions