En Fri, 02 May 2008 18:29:57 -0300, Alex Fainshtein <[EMAIL PROTECTED]> escribió:

Question: what I am doing wrong? Here, I am defining class with property
member:

class Test:

    def getter(self):
        print "Getter called."
        return 'a'

    def setter(self, val):
        print "Setter called."

    prop = property(getter, setter)

property requires a new-style class; change the first line to class Test(object):
http://docs.python.org/lib/built-in-funcs.html#l2h-57

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to