Hi,

Read this:
http://www.python.org/2.2.3/descrintro.html#property

If you still don't understand or are confused about it's usage, ask here.

Hint: Suppose you need to create an Age class with a 'years' attribute
and ensure that, (assuming I create an object a = Age())
1) when one tries to access 'a.years', a '0' would be returned even if
the value was not set or was set to a negative value, and

2) If a value is assigned to the 'years' attribute, we should check
for negative values.

HTH
Regards
Steve
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to