Well, I have used factories of properties external to the class many
times,
and they work pretty well.
Michele Simionato
--
http://mail.python.org/mailman/listinfo/python-list
Frankly, I was surprised this worked at all, but I tried
creating a property outside of a class (i.e. at the module
level), and it seems to behave as a property:
def get_x(ob):
... global x
... return str(x)
...
def set_x(ob, value):
... global x
... x = int(value)
...
def
On Wed, 24 Aug 2005 01:15:03 -0500, Terry Hancock [EMAIL PROTECTED] wrote:
Frankly, I was surprised this worked at all, but I tried
creating a property outside of a class (i.e. at the module
level), and it seems to behave as a property:
def get_x(ob):
... global x
... return str(x)
...
Terry Hancock wrote:
Frankly, I was surprised this worked at all, but I tried
creating a property outside of a class (i.e. at the module
level), and it seems to behave as a property:
Not so surprising. Making a class begins by making a little namespace,
then using it to build the class. If