How to use Java 8 lambdas in Jython
问题 I am trying to experiment with java 8 streams and collections in jython to see if they are any efficient then when implemented in pure jython. It occurs to me it could (any comments on this also appreciated) I started with some examples, the counting from java.util.function import Function from java.util import ArrayList from java.util.stream import Collectors letters = ArrayList(['a','b','a','c']); cnt=letters.stream().collect(Collectors.groupingBy(Function.identity(), Collectors.counting())