On 5/19/2010 1:14 AM, Vincent Davis wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
class C(object):<br>
def __init__(self, new):<br>
self.letter = dict(a=1,b=2,c=3, amin=np.amin)<br>
self.new = new<br>
self._x = None<br>
self._Y = None<br>
<br>
@property<br>
def x(self):<br>
"""I'm the 'x' property."""<br>
self._x = self.new<br>
return self._x<br></blockquote></div></blockquote><div><br>I just wanted to point out that your<br><br><span style="font-family: courier new,monospace;">self._x = self.new</span><br><br>does not give you a new object. Instead, _x is assigned a reference that points to this object called 'new', which is passed in during the class initialisation. I think your variable naming needs some improvement to show/correct your understanding.<br>
<br>Also, you can just use `x` and `y` for the variable names; you don't need the underscore. If you want to use a pseudo-private variable, use __x (double prefix underscore) instead.<br><br>Cheers,<br>Xav<br></div></div>