You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from springfield import Entity, fields
class TestEntity(Entity):
foo = fields.StringField()
@property
def bar(self):
return True
@bar.setter
def bar(self, value):
print 'Set bar to %s' % value
e = TestEntity()
print e.bar
e.bar = False
True
Traceback (most recent call last):
File "/Users/mthornton/Library/Preferences/PyCharm2017.3/scratches/scratch.py", line 16, in <module>
e.bar = False
File "/Users/mthornton/Projects/PulseSecure/pulse-one-pycharm/venv/lib/python2.7/site-packages/springfield/entity.py", line 203, in __setattr__
raise AttributeError('Field %r not defined.' % name)
AttributeError: Field 'bar' not defined.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: