Changes between Version 58 and Version 59 of pyson
- Timestamp:
- 10/11/21 16:37:38 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pyson
v58 v59 65 65 WARNING: Using Decimal causes rounding errors. This is because pyson takes python's json representation format which contains floats for numbers. And floats can not represent all decimals accurately. 66 66 67 You can use {{{ Union[X, NoneType] }}} where {{{NoneType=type(None)}}} if the object can also be None. So for exmple you can use {{{reservationBid:Union[Bid,type(None)] = None}}}. Do not use the mypy.NoneType which is an entirely different class. We do not support {{{ Union[X,Y] }}} where both X and Y are not NoneType.67 You can use {{{ Union[X, NoneType] }}} where {{{NoneType=type(None)}}} or {{{Optional[X]}}}if the object can also be None. So for exmple you can use {{{reservationBid:Union[Bid,type(None)] = None}}}. Do not use the mypy.NoneType which is an entirely different class. We do not support {{{ Union[X,Y] }}} where both X and Y are not NoneType. 68 68 69 69 === Exceptions