I have a misbehaving iPython that runs getters twice (but not setters):
class C(object):
@property
def foo(self):
print 'running C.foo getter'
return 'foo'
@foo.setter
def foo(self, value):
print 'running setter'
Log from ipython:
In [2]: c = C()
In [3]: c.foo
running C.foo getter
running C.foo getter
Out[3]: 'foo'
In [4]: c.foo = 3
running setter
Env is
- Python 2.7.3 (default, Dec 6 2012, 13:30:21)
- IPython 0.13.1
- OSX ML with recent dev-tools update
- a venv with lots of stuff
This is no longer a code question, as it seems this is not the way properties should normally work.