Fixing definition of a valid python key