cbor2 icon indicating copy to clipboard operation
cbor2 copied to clipboard

Complex numbers!

Open chillenb opened this issue 1 year ago • 1 comments

Things to check first

  • [X] I have searched the existing issues and didn't find my feature already requested there

Feature description

It would be nice to have encoding and decoding of Python complex type, as well as complex arrays. These correspond to tags 43000 and 43001!

Use case

Complex numbers are the only unsupported Python builtin numeric type. If you support them, I'd have a good reason to use CBOR rather than JSON!

chillenb avatar Nov 11 '24 19:11 chillenb

I have added support for complex numbers here: https://github.com/chillenb/cbor2/tree/complex will make a PR soon after I write tests.

chillenb avatar Nov 17 '24 17:11 chillenb