Developers Day 2002 Making classes look like types (and vice versa) Or…
Developers Day 2002 Compound W for Pythons object model Or…
Developers Day 2002 Goading Guido into describing something only he (fully) understands
(C) 2002 Zope Corp. 4 New stuff… properties descriptors (?) old-style classes (ok, old stuff) new builtins –object, super, property, staticmethod, classmethod, dict, … new-style classes method resolution order
(C) 2002 Zope Corp. 5 What about metaclasses…?
(C) 2002 Zope Corp. 6 What about metaclasses…? >>> brain.kaboom()
(C) 2002 Zope Corp. 7 More new stuff… __getattribute__() property interface –__get__() –__set__() –__delete__() __slots__ __mro__ __new__()
(C) 2002 Zope Corp. 8 Issues… Status of PEPs 252, 253, 254 More syntactic support –staticmethod –classmethod, etc… Limitations in extending C types –Adding C slots Documenting everything
(C) 2002 Zope Corp. 9 Questions… Has anybody used it for real? Usability? Functionality? Promoting this stuff from experimental status Getting rid of classic classes? Performance?
(C) 2002 Zope Corp. 10 References… Putting Metaclasses to Work: A New Dimension in Object-Oriented Programming, by Ira R. Forman and Scott H. Danforth. Addison-Wesley, 1999, ISBN