New style classes

Lamonte Harris pyth0nc0d3r at gmail.com
Tue Aug 28 18:32:45 EDT 2007


Whats the point of object?  How do I actually use it.  I'm not understanding
correctly from the python site located:
http://www.python.org/download/releases/2.2.3/descrintro/

class C(object):

    def __init__(self):
        self.__x = 0

    def getx(self):
        return self.__x

    def setx(self, x):
        if x < 0: x = 0
        self.__x = x
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070828/73b593ac/attachment.html>


More information about the Python-list mailing list