pidl/python: Support more scalar types when converting from Python.