RELEASED: Python 2.2a1

Terry Reedy tjreedy at
Wed Jul 18 20:24:17 EDT 2001

"Guido van Rossum" <guido at> wrote in message
news:mailman.995464538.29395.python-list at
> I'm writing an introduction to the type/class unification:

This intro also describes some neat 'by-product' features that I have
missed seeing mentioned on the newsgroup:

* Static methods (and class methods also): If this does not stop people
from asking 'how do I write static class methods', at least now we will be
able to say follow 'def f...' with 'f  = staticmethod(f)' instead of 'you
cannot' and 'here is a kludgy workaround'.

* A getset typeclass that allows us to have our cake (the nice
instance.attr notation) and eat it too (by having such accesses optionally
rerouted to attribute-specific get and set methods instead of all-attribute
__get/setattr__).  This will end discussions about which now-unnecessary
compromise to make.

These are nice improvements in the Python class model.  There is also an
improved base-class lookup rule at least for type-based classes.

Terry J. Reedy

More information about the Python-list mailing list