Page 5 of 38
Prev
|
Index
|
Next
Differences - Python & Jython
Python
C
Multi-platform
Compiles to .pyc
Extend with C
GIL
Python Garbage Collection
Jython
100% Java
Any JVM (currently 1.1+)
Compiles to .class
Extend with Java
Truly multi-threaded
Java garbage collection
General Bits
__del__ is not reliable because the Java garbage collector is used
Java only has Unicode strings
Cannot mix Python and Java classes in multiple inheritance
Java instances cannot have dynamic attributes
Boolean type difficult to address:
public void do(int i);
public void do(boolean b);
Jython changes with two fronts:
Keeping up with CPython language changes
new-style classes
list comprehensions
generators
Keeping up with Java language changes
enum
auto-boxing
vargs
generics (not necessary in Python)
annotations
StackTraceElement