All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.python.modules._collections.Collections Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 2.7.4
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy