On Wed, Dec 5, 2012 at 10:38 AM, Malcolm Newsome
<malcolm.news...@gmail.com> wrote:
>
> One thing I've come across in C# (and, quite frankly, am having a difficult
> time grasping) is Get and Set (Accessors).
>
> Since, I don't ever recall reading about this in Python, I'm wondering if
> they exist.

Python uses what it calls "descriptors" to create bound methods and
handle special properties such as __dict__, __weakref__, and slots
defined by __slots__. You can roll  your own as you see fit. Raymond
Hettinger's guide is a good place to start:

http://docs.python.org/3/howto/descriptor.html
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to