comment here

This commit is contained in:
ton
2023-03-18 20:03:34 +07:00
commit 4553a0a589
14513 changed files with 2685043 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
def default_complex_serializer(obj: complex, **_) -> dict:
"""
Serialize a complex as a dict.
:param obj: the complex.
:param _: not used.
:return: a ``dict``.
"""
return {'real': obj.real, 'imag': obj.imag}