|
6 | 6 |
|
7 | 7 | import java.io.IOException;
|
8 | 8 | import java.io.ObjectInputStream;
|
9 |
| -import java.lang.reflect.Constructor; |
10 |
| -import java.lang.reflect.Type; |
11 | 9 | import java.util.Collection;
|
12 | 10 | import java.util.Iterator;
|
13 | 11 | import java.util.LinkedHashMap;
|
@@ -294,7 +292,7 @@ public void __setitem__(PyObject key, PyObject value) {
|
294 | 292 | @Override
|
295 | 293 | public void clear() {
|
296 | 294 | this.linkedHashMap.clear();
|
297 |
| - super.clear();; |
| 295 | + super.clear(); |
298 | 296 | }
|
299 | 297 |
|
300 | 298 | /**
|
@@ -347,10 +345,6 @@ public PyList items() {
|
347 | 345 | for (Map.Entry<PyObject, PyObject> entry: entries) {
|
348 | 346 | l.add(new PyTuple(new PyObject[] { entry.getKey(), entry.getValue() }));
|
349 | 347 | }
|
350 |
| - System.out.println("Class is " + l.getClass().getName()); |
351 |
| - for (Class i : l.getClass().getInterfaces()) { |
352 |
| - System.out.println("Interface : " + i.getName()); |
353 |
| - } |
354 | 348 | return new PyList(l);
|
355 | 349 | }
|
356 | 350 |
|
@@ -391,31 +385,9 @@ public PyObject iteritems() {
|
391 | 385 | */
|
392 | 386 | @Override
|
393 | 387 | public PyList keys() {
|
394 |
| - |
395 |
| - Class<?> c = PyList.class; |
396 |
| - Constructor[] allConstructors = c.getDeclaredConstructors(); |
397 | 388 | Set<PyObject> keys = this.linkedHashMap.keySet();
|
398 | 389 | java.util.Vector<PyObject> v = new java.util.Vector<>(keys.size());
|
399 | 390 | v.addAll(keys);
|
400 |
| - System.out.println("########## What is the type of the vector key lists " + v.getClass().getName()); |
401 |
| - Class<?> cArg = v.getClass(); |
402 |
| - for (Constructor ctor : allConstructors) { |
403 |
| - Class<?>[] pType = ctor.getParameterTypes(); |
404 |
| - for (int i = 0; i < pType.length; i++) { |
405 |
| - if (pType[i].equals(cArg)) { |
406 |
| - System.out.format("%s%n", ctor.toGenericString()); |
407 |
| - |
408 |
| - Type[] gpType = ctor.getGenericParameterTypes(); |
409 |
| - for (int j = 0; j < gpType.length; j++) { |
410 |
| - char ch = (pType[j].equals(cArg) ? '*' : ' '); |
411 |
| - System.out.format("%7c%s[%d]: %s%n", ch, |
412 |
| - "GenericParameterType", j, gpType[j]); |
413 |
| - } |
414 |
| - break; |
415 |
| - } |
416 |
| - } |
417 |
| - } |
418 |
| - System.out.println(); |
419 | 391 | return new PyList(v);
|
420 | 392 | }
|
421 | 393 |
|
@@ -509,11 +481,9 @@ private void doUpdate(PyDictionary od) {
|
509 | 481 |
|
510 | 482 | for (int i = 0; i < pylist.size(); i++) {
|
511 | 483 | PyTuple tuple = (PyTuple) pylist.get(i);
|
512 |
| - System.out.println("py tuple " + tuple.toString()); |
513 | 484 | this.__setitem__(Py.java2py(tuple.get(0)), Py.java2py(tuple.get(1)));
|
514 | 485 | super.__setitem__(Py.java2py(tuple.get(0)), Py.java2py(tuple.get(1)));
|
515 | 486 | }
|
516 |
| - System.out.println("LOOP ENDED"); |
517 | 487 | }
|
518 | 488 |
|
519 | 489 | private void doUpdate(PyObject d,PyObject keys) {
|
|
0 commit comments