[Tutor] Properties of an object
Vicent
vginer at gmail.com
Fri Jan 30 13:08:17 CET 2009
On Fri, Jan 30, 2009 at 12:43, Kent Johnson <kent37 at tds.net> wrote:
>
> A note on terminology: In Python, what you are describing is called an
> attribute. 'property' has a very specific meaning, it is a way to
> associate a value with an instance that uses attribute notation for
> access, i.e. a.b, but actually uses a method call to get and set the
> value. In other words, it provides the flexibility of getters and
> setters with the notation of a plain attribute. Moreover, you can
> change a value from an attribute to a property without changing client
> code at all. This might be appropriate for your 1stpart and 2ndpart
> values. See
> http://personalpages.tds.net/~kent37/kk/00008.html<http://personalpages.tds.net/%7Ekent37/kk/00008.html>
> http://docs.python.org/library/functions.html#property
>
>
OK... Now I see. Thank you, and also to Spir again!
--
Vicent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090130/7d13827d/attachment.htm>
More information about the Tutor
mailing list