Re: Trouble with property

2006-10-23 Thread Ben Finney
"Odalrick" <[EMAIL PROTECTED]> writes: > Gabriel Genellina skrev: > > > You must use a new-style class for properties to work. That is: > > class ConstrainedBox(object): > > Thank you, I've seen it mentioned, but never knew what it meant. More generally, a "new-style class" is important in this i

Re: Trouble with property

2006-10-23 Thread Odalrick
Gabriel Genellina skrev: > You must use a new-style class for properties to work. That is: class > ConstrainedBox(object): > > -- > Gabriel Genellina > Softlab SRL > Thank you, I've seen it mentioned, but never knew what it meant. /Odalrick -- http://mail.python.org/mailman/listinfo/python-li

Re: Trouble with property

2006-10-23 Thread Gabriel Genellina
At Monday 23/10/2006 20:28, Odalrick wrote: I'm having some trouble with using property. This class is supposed to represent a rectangle that can never be outside an area. class ConstrainedBox: # The property that is causing grief linear_size = property( _get_linear_size, _set_linear_si

Trouble with property

2006-10-23 Thread Odalrick
I'm having some trouble with using property. This class is supposed to represent a rectangle that can never be outside an area. I'll snip the parts I don't think are relevant. Or should I? I dunno. class ConstrainedBox: def __init__( self, size, ratio ): # Various instance va