Goals for the New Year

I had not gotten a ton done for Python last year and so I am hoping to change that this year. I have a nice list of things to get done this year.

First, there is some AST work to do. The PyObject branch of the AST is not finished. That needs to be completed so as to evaluate whether it or the current solution should be used. Once that has been settled then work can be done to export the AST to Python code so it can be manipulated before finally being written out to bytecode.

Next, there are multiple PEPs I want to write. One I actually have a rough draft of but I have not bothered to push out there yet: a __signature__ PEP. This tries to deal with the object identity problem thanks to decorators. Normally a method or function is wrapped in another function, preventing proper introspection on the actual function being used instead of the wrapper. The PEP proposes adding a magic attribute, __signature__, which contains a signature object that has all the information about the parameters on the actual function being called.

I also want to write a PEP on deprecating .pyo files. Guido cleared this idea so as to simplify bytecode file usage. The trick is working out how .pyc files will store how they were compiled (-O, etc.) and how to deal with the issue of when the interpreter is using different optimizations than the ones the .pyc file it is importing used.

Finally, PEP 339 needs an update. Unfortunately this cannot be done until the PyObject branch of the AST is finished and has either been accepted or rejected.

The last couple of things for Python are slightly random. One is to implement a new data structure for the 'collections' module; either red-black trees or bags ala Smalltalk. Doing them in Python is no big deal but doing them in C for memory and speed purposes would be the true goal.

Next is implementing a function that turns attribute access into a generic lifting function. What this means is that if you used this lift() function on an iterator that all attribute accesses would be applied to all returned items by the iterator and not on the iterator itself. For instance, taking the tuple ``(1, 2, 3, 4)`` and applying this mythical lift function along with the __pow__ method to double every item, ``iterlift((1, 2, 3, 4)).__pow__(2)`` would cause every returned item to be squared. Not an overly important thing, but the querying abilities being added to .NET and C# have something like this so I just think it would be interesting to make it work in Python as well.

I have written a Firefox search engine plug-in for docs.python.org and submitted to mozdev. Have not heard from them, though, and I need to link to it from docs.python.org so that other people know about it.

And finally, I want to add a Vim syntax file for Python to the repository. I am rather tired of not having True and False highlighted since Vim 6 has been out for ages and thus does not have a new syntax highlighting file. Maintaining one ourselves would keep it updated constantly and can just be bound by the Vim config file kept in the repository.

No way in hell I am going to get to all of this, but I will try to get to as many as posssible.