[EMAIL PROTECTED] wrote:
>     name=property(getname,setname,None,None)
> 
> However, it no longer works if I modify getname and setname to
> 
>     def getname(self):
>         return self.name
> 
>     def setname(self,newname="Port2"):
>         self.name=newname

That's because you're actually modifying the property in setname instead
of modifying the normal attribute. It's equivalent to doing:

def setname(self, newname="Port2"):
    self.setname(newname)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to