State of the Python Union

Belatedly, here are my notes from Guido van Rossum’s “State of the Python Union” talk this past Wednesday.

Guido discusses (with illustrations) his recent eye problems.

SD Magazine/Jolt Productiviity Award given to Python 2.4. O’Reilly Python book sales are up. Unscientifically extracted Sourceforge stats: about 4000 python projects.

Discussion of PEP 342 and PEP 343 broke records on python-dev (“What about decorators?” somebody asks. “I think this was worse,” Guido says.)

PEP 342: Generator enhancements. Can we make yield do some of the things that it does in Ruby? Yield becomes an expression instead of a statement.

PEP 343: The “with” statement. Sort of syntactic sugar on try-finally. He abandoned his hope of a Pascal-style “with” thanks to finding a web posting from the C# team on why that wasn’t a good idea.

“Hopeful PEPs”: 3000, 344, 341. Seemed more mixed on 315, 246, 245.

Exception reform. Possible new exception hierarchy. Basic idea is to prevent a bare “except:” from catching critical things like SystemExit, MemoryError, and KeyboardInterrupt – in general, you want these things to kill your app. Showed detailed chart of proposed new hierarchy, less radical than earlier proposals.

Python 3.0 will be throwing out classic classes, string exceptions, etc. Before it arrives, many of its additions will appear in 2.5+, some by default, some via future. There will be a period of parallel development in 2.x and 3.x.

Python 3.0 will not be a rewrite of the interpreter.

Library restructuring needs a champion! Any volunteers?

Most controversial thing that might or might not make it in to Python 3.0: Optional type declarations. Could help with documentation, IDEs, PyChecker.

def f(x: str, y: list[int], z: file|None = None)->bool:

It’s intentionally Pascal-like, he says. Pascal the first language that made him aware of choices in language design.

My notes end here. Feel free to post comments filling in any critical gaps.

Update: Powerpoint slides from the talk are now available at python.org.



Share: