我如何使用 gmpy 实现大整数的异或运算?

How could I implement a xor operation of big integers with gmpy?

我想异或两个大整数。 刚刚安装了 gmpy2 库,但没有任何 mpz_xor 操作。 我错过了什么吗?

Python 有运算符重载,所以他们才做到了 ^。我会 post 一个演示,但我只能访问 gmpy 1.17,而不是 gmpy2。不过,这里的 code link 显示存在 ^ 过载。