Simple questions on use of objects (probably faq)

Brian Elmegaard brian at rkspeed-rugby.dk
Wed Mar 8 14:35:08 CET 2006


bruno at modulix <onurb at xiludom.gro> writes:

> Now how you could do it the OO way (Q&D, not really tested):

Something goes wrong in my 2.3 when I change the syntax to
_add_instance=classmethod(_add_instance).

If I understand this correctly the class is keeping track of the
instances of itself. The class is extendible and has all the needed
methods. This means that any global lists can be
avoided. Interesting. 

-- 
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk



More information about the Python-list mailing list