469,306 Members | 1,557 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

Re: 'property' builtin does not work for me

En Fri, 02 May 2008 18:29:57 -0300, Alex Fainshtein
Question: what I am doing wrong? Here, I am defining class with property

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

Gabriel Genellina

Jun 27 '08 #1
0 706

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by BJörn Lindqvist | last post: by
16 posts views Thread by Howard Jess | last post: by
25 posts views Thread by Michal Kwiatkowski | last post: by
6 posts views Thread by =?iso-8859-1?q?Erik_Wikstr=F6m?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.