-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Creating a instance of a field will make it look like it fails because BaseField prints None, however it doesn't (I just spent a while seeing why it was 'failing').
Script that demonstrates the 'fail'
from suitcase.fields import UBInt8
# create our placeholder
u = UBInt8(instantiate=False)
print u # correct result
# create our actual object
u = UBInt8(instantiate=True)
print u # doesn't return a instance..... or does it
Fix would be simply changing the BaseField repr to,
def __repr__(self):
return "Field(_value="+repr(self.getval())+")"
and we get a much better result that doesn't seem to fail, though having just the normal repr would give better information (i.e what field).
Metadata
Metadata
Assignees
Labels
No labels