Esempio n. 1
0
  @ExposedNew
  @ExposedMethod
  public void ImportFrom___init__(PyObject[] args, String[] keywords) {
    ArgParser ap =
        new ArgParser(
            "ImportFrom",
            args,
            keywords,
            new String[] {"module", "names", "level", "lineno", "col_offset"},
            3,
            true);
    setModule(ap.getPyObject(0, Py.None));
    setNames(ap.getPyObject(1, Py.None));
    setLevel(ap.getPyObject(2, Py.None));
    int lin = ap.getInt(3, -1);
    if (lin != -1) {
      setLineno(lin);
    }

    int col = ap.getInt(4, -1);
    if (col != -1) {
      setLineno(col);
    }
  }
Esempio n. 2
0
 public ImportFrom(PyObject module, PyObject names, PyObject level) {
   setModule(module);
   setNames(names);
   setLevel(level);
 }