Changes between Version 56 and Version 57 of pyson


Ignore:
Timestamp:
09/09/21 14:22:47 (3 years ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pyson

    v56 v57  
    6565You 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.
    6666
    67 ===Exceptions
     67=== Exceptions
    6868Exceptions are handled as follows:
    6969Serialization of an exception gives {{{ {"message":"...", "cause": EX, "stackTrace":[]} }}} where EX is either None or another serialized exception. This format tries to maximize compatibility with the jackson way of serializing exceptions. The "stackTrace" field is always empty because python does not include the stacktrace with exceptions; it's there only for compatibility of the format with java. Note that the type of the exception is not included (as in jackson).