Re: Confused about properties, descriptors, and attributes...

2006-04-20 Thread Alexis Roda
[EMAIL PROTECTED] escribió: > I've been reading about Python Classes, and I'm a little confused about > how Python stores the state of an object. I was hoping for some help. > > I realize that you can't create an empty place holder for a member > variable of a Python object. It has to be given a v

Re: Confused about properties, descriptors, and attributes...

2006-04-20 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I've been reading about Python Classes, and I'm a little confused about > how Python stores the state of an object. Simply put: a Python object is mostly a hashtable, with attribute names as keys and references to other objects as values - one of these name/ref pair

Re: Confused about properties, descriptors, and attributes...

2006-04-20 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > But what is the difference between an Attribute of a Class, a > Descriptor in a Class, and a Property in a Class? A class has a class dictionary, which contains methods and other class-level members for this class. Each instance of a class has its own instance dictiona

Confused about properties, descriptors, and attributes...

2006-04-20 Thread redefined . horizons
I've been reading about Python Classes, and I'm a little confused about how Python stores the state of an object. I was hoping for some help. I realize that you can't create an empty place holder for a member variable of a Python object. It has to be given a value when defined, or set within a met