org.python.modules._collections.Collections Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jython-slim Show documentation
Show all versions of jython-slim Show documentation
Jython is an implementation of the high-level, dynamic, object-oriented
language Python written in 100% Pure Java, and seamlessly integrated with
the Java platform. It thus allows you to run Python on any Java platform.
package org.python.modules._collections;
import org.python.core.ClassDictInit;
import org.python.core.PyObject;
/**
* Collections - This module adds the ability to use high performance data
* structures.
* - deque: ordered collection accessible from endpoints only
* - defaultdict: dict subclass with a default value factory
*/
public class Collections implements ClassDictInit {
public static void classDictInit(PyObject dict) {
dict.__setitem__("deque", PyDeque.TYPE);
dict.__setitem__("defaultdict", PyDefaultDict.TYPE);
}
}