Ori Avtalion <o...@avtalion.name> added the comment:
My use-case is modifying existing code that supports bytes to also support bytearray. https://github.com/mongodb/mongo-python-driver/blob/9902d239b4e557c2a657e8c8110f7751864cec95/bson/_cbsonmodule.c#L1112 The buffer protocol, which I didn't know of, feels slightly complicated for my use-case. For now I opted to adding these macros myself, only changing 3 lines. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36065> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com