Python: stricter checks on attribute names; only string attribute names are allowed now