Import This: the Tenth International Python Conference

In-depth coverage of this year's Python conference; who was there, what they said and what they're working on.
Other Talks

David Cooper demonstrated a large NATO intranet that they converted to Zope in eight months. They made a content management tool called WISE that runs on top of Zope. Like Zope, WISE turned out to be much more popular than they expected. It looks like the tool won't be released publicly, although I'm hearing conflicting information about it.

I gave a talk on the Cheetah string-template system (shameless plug: the paper itself), and Geoff Tavola gave an introductory talk on Webware. There was also a talk on Twisted, an Internet application framework that aims to be the next generation of technology after the Web.

Paul Pfeiffer talked about "The Usability of Python, Perl and TCL", looking at two "moderately complex" programming tasks in all three languages: a paint program and a chat program, both using Tk graphics. He looked mostly at maintainability, because that's where he says 70% of the programming effort is directed. Python outperformed both Perl and Tcl, although Tcl made a good showing in the chat program. The Python programs had the fewest defects, although the difference was more pronounced in the paint program. The biggest problems were object design and sockets (Perl sockets are not first-class objects). Tcl had the best string handling of all three languages. Python had the best performance (even though its Tk implementation calls Tcl behind the scenes), but the tab/space confusion and the lack of non-blocking I/O were hindrances. The Perl libraries he found to be poorly documented.

Developers' Day

Guido's only talk took place on the morning of Developers' Day. Many, including me, wished he could have talked more, but he's been occupied with more important matters: the birth of his son, Orlijn, this past November (pictures on Guido's web site). The talk was called "The State of the Python Union", or "An Overview of the Things that Keep Guido Awake at Night." super, property and slot are evolving into context-sensitive keywords; the first two are builtin functions in Python 2.2, but that was just an experimental step, especially since the current super syntax is so clumsy: super(MyOwnClass, self).method(args...).

Other development work that may see the light of day include a logging module, a DB-API 3 with a transactional module, import from a .zip file and some kind of standard module for persistence beyond pickle/shelve. (Contrary to a rumor in my last article, ZODB is not going into the standard library any time soon, because Guido's not sure it's the most appropriate implementation of persistence. Getting into the standard library is a monumental task, and it pretty much only happens when it's obvious that a certain module is by far the best solution.) Zope is trying different approaches for interfaces in Zope 3, and if a clear winner emerges it may trickle into the Python core eventually.

For Guido, the star of the show this conference was PyChecker, a kind of lint tool for Python source. It checks for:

  • No global found (e.g., using a module without importing it)

  • Passing the wrong number of parameters to functions/methods/constructors

  • Passing the wrong number of parameters to builtin functions & methods

  • Using format strings that don't match arguments

  • Using class methods and attributes that don't exist

  • Changing signature when overriding a method

  • Redefining a function/class/method in the same scope

  • Using a variable before setting it

  • Self is not the first parameter defined for a method

  • Unused globals and locals (module or variable)

  • Unused function/method arguments (can ignore self)

  • No doc strings in modules, classes, functions, and methods

[Source: PyChecker web site]

Performance has been going down ("except for things that are faster") in recent versions of Python as more and more "gee-whiz" features have been added fast and furiously. Guido would like to focus future Python versions on performance rather than on language extensions. 50% of the overhead seems to be in the virtual machine and the other 50% in data structures. He'd like to move some C code into Python, especially since many portions already have equivalent Python implementations. The traceback code, the bytecode compiler (from AST), the interactive command line and the import search all have redundant implementations both in C and Python and, of course, the Python versions are easier to debug.

Then came the "Parade of the PEPs". This was supposed to be a rundown through all the Python Enhancement Proposals, looking at their current statuses. Unfortunately there wasn't enough time for this, so it got cut short. I'd really like to see this feature happen in future conferences, or perhaps a quarterly on-line report could be the equivalent. But Guido did discuss the PEPs he wanted community input on, for instance, string interpolation. Is it a priority? He admitted that %(name)s was a mistake: it's too easy to forget the 's', it's awkward to type and it combines two operations (string interpolation and numeric formatting) that are, in practice, rarely done simultaneously (when was the last time you used %(name)d?). Now he prefers $name or ${name}, same as Perl and the shells (and Cheetah).

It's interesting, he said, that if you let a year go by, many issues that were once pressing become obsolete.

Also during Developers' Day were "lightning talks" (short talks) and other talks. One was on the Python Mail System (PMS), an entire library of routines to base a mail client on. State is kept in a pickle, and "folders" can be arbitrary views of physical folders (e.g., filtered, sorted, recursive). There were also talks on optimizing Python, Unicode difficulties and the type-class unification.

"Immutability is all in your mind", so said Barry Warsaw in the type-class unification talk. In Python 2.2, you can subclass int but that doesn't make it mutable. It does mean you can add methods or attributes. Try it at home.

>>> class I(int):
...   lookMa = "No hands!"
... 
>>> i = I(5)
>>> i      
5
>>> i + 3
8
>>> i.lookMa
'No hands!'

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Import This: the Tenth International Python Conference

Anonymous's picture

The " top things people say when he mentions Zope" posed some very important questions.

Where should I look or expect follow-up to these?

They seem to be appropriate FAQ's posted at zope.org, etc..

Great Report, Python is easy to learn

Anonymous's picture

Great Report! I sure wish I could have been there! Maybe next year...

A good place to start learning Python is at Python City

Re: Import This: the Tenth International Python Conference

Anonymous's picture

Hey, what about the status of wXPython?

Now that is a nice piece of work!

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState