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
I would like to know why Int (Number generally) cannot deserialize None i.e. serialize None to None. This used to be the case in previous versions of colander but it seems to have been removed. Instead now it fails on the call to int(None). Was there a reason for this design change?
Also DateTime serializes None to colander.null. This has been changed for most other types to only serialized colander.null to colander.null by:
@ny2ko I'd rather have number type always give me a number, and not None. Think static typing. The only case where I'd want None to be converted to None would be when I explicitly specify missing to None.
I'm confused too... It seems the Number functionality was reverted in 513d860 but I can't seem to see any comments as to why the change was made. @mcdonc since you committed that, can you comment on this? The previous behaviour was to treat both None and colander.null as colander.null. This seems to make sense with respect to the null documentation saying the purpose of colander.null is to represent a non-value in the cases where None is a valid value. If we're in a case where None isn't valid (as is the case for Numbers) why not make it work the same as colander.null?
I would like to know why Int (Number generally) cannot deserialize None i.e. serialize None to None. This used to be the case in previous versions of colander but it seems to have been removed. Instead now it fails on the call to int(None). Was there a reason for this design change?
Also DateTime serializes None to colander.null. This has been changed for most other types to only serialized colander.null to colander.null by:
Is there a reason why DateTime is any different?
The text was updated successfully, but these errors were encountered: