private final static Class<?> typeToClass(final char typecode) {
        switch (typecode) {
        case '1':
            return Byte.TYPE;
        case 's':
            return Short.TYPE;
        case 'i':
            return Integer.TYPE;
        case 'l':
            return Long.TYPE;
        case 'f':
        case 'F':
            return Float.TYPE;
        case 'd':
        case 'D':
            return Double.TYPE;
        case 'O':
            return PyObject.class;
        default:
            throw Py.ValueError("typecode must be in [1silfFdDO]");
        }
    }