Chapter 4. User-Defined Functions and Variable Scoping
Functions are those callable objects that can exist outside of a class. Functions also appear in class definitions, where they are made into methods by object attribute lookup. This chapter, however, focuses on function definition outside of classes. Java does not allow such classless entities; Jython, on the other hand, does. In Jython, functions are first-class objects, meaning the language allows for their dynamic creation and the ability to pass them around as parameters or return values. Jython functions are instances of the org.python.core.
PyFunction
class (PyReflectedFunction
for built-in ...
Get Jython for Java Programmers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.