J
Jakub Hegenbart
Hi,
I'm studying the descriptor protocol and its usage from the following
document:
http://users.rcn.com/python/download/Descriptor.htm
There is some sample code:
http://users.rcn.com/python/download/Descriptor.htm#descriptor-example
that behaves in a different way on my machine than the example suggests:
In [2]: a=MyClass()
In [3]: a.x
Retrieving var "x"
Retrieving var "x"
Out[3]: 1
Retrieving var "x"
10
Should I take as granted that IPython might in some cases access an
attribute
of an object more than once even in face of side effects, or is this a bug?
Regards,
Jakub Hegenbart
I'm studying the descriptor protocol and its usage from the following
document:
http://users.rcn.com/python/download/Descriptor.htm
There is some sample code:
http://users.rcn.com/python/download/Descriptor.htm#descriptor-example
that behaves in a different way on my machine than the example suggests:
In [2]: a=MyClass()
In [3]: a.x
Retrieving var "x"
Retrieving var "x"
Out[3]: 1
Retrieving var "x"
10
Should I take as granted that IPython might in some cases access an
attribute
of an object more than once even in face of side effects, or is this a bug?
Regards,
Jakub Hegenbart