Contents TableOfContents
Alpha
- Generator expressions
- Function/method decorators
[http://www.python.org/peps/pep-0308.html PEP 308]: Conditional expressions
- 'with' statement
- New generator features
- Unified try/except/finally
Done
- yield is always a keyword.
- enumerate() built-in added.
int() will now return a long instead of raising OverflowError if a number is too large.
- list.insert() changed to be consistent with negative slice indexing.
- list.index() takes optional start, stop arguments.
- Dictionaries gained a pop() method and .fromkeys() class method.
- dict() constructor takes keyword arguments.
- Many type objects are now callable.
[http://www.python.org/dev/peps/pep-0218/ PEP 218]: A Standard Set Datatype
[http://www.python.org/dev/peps/pep-0273 PEP 273]: Importing Modules from Zip Archives
[http://www.python.org/dev/peps/pep-0278 PEP 278]: Universal Newline Support
[http://www.python.org/dev/peps/pep-0285 PEP 285]: A Boolean Type
Beta
assert no longer checks __debug__ flag.
[http://www.python.org/dev/peps/pep-0307 PEP 307]: Pickle Enhancements
- Unifying int/long
[http://www.python.org/dev/peps/pep-0263 PEP 263]: Defining Python Source Code Encodings
- Multi-line imports
Absolute & relative imports
- Exceptions as new-style classes
[http://www.python.org/doc/2.5/whatsnew/pep-357.html PEP 357]: Allowing Any Object to be Used for Slicing
Replace jythonc
jythonc doesn't handle generators and is difficult to debug and improve. The current thinking is to add capabilites to jython itself to generate bytecode from py files and run those statically compiled items rather than jythonc's approach of making Java classes that work like the base Python code. See http://thread.gmane.org/gmane.comp.lang.jython.devel/1429/focus=1430 for the general idea.
Solidify Import System
Jython adds to Python's import system to handle loading from Java's classpath and to load from jar files. It's not exactly clear what modifications are in place and what techniques are best for adding jar files to the path at runtime and things like that. An informational JEP explaining what's been added and how things relate to both the Python and Jython sides would be nice.
Brett Cannon has been working on rewriting all of Python's import machinery in Python; see http://svn.python.org/view/sandbox/trunk/import_in_py/ for the code.
Complete Java to Python naming integration
Java allows a method and field of the same name to exist in the same class. Python only has a single namespace for these items. This leads to methods being hidden in a Java instance in Jython if the instance has a field of the same name. In addition, the bean convenience methods that map object.getField() in Java to object.field in Jython lead to collisions. See http://thread.gmane.org/gmane.comp.lang.jython.user/4919/ and http://jython.org/bugs/1509095. A standard system for renaming fields and methods to avoid collisions and a JEP explaining the whole thing would be most welcome.