相关疑难解决方法(0)

python 2.7相当于内置方法int.from_bytes

我正在尝试使我的项目python2.7和3兼容,而python 3具有内置方法int.from_bytes.是否存在python 2.7中的等价物,或者说这个代码2.7和3兼容的最佳方法是什么?

>>> int.from_bytes(b"f483", byteorder="big")
1714698291
Run Code Online (Sandbox Code Playgroud)

python compatibility python-2.7

11
推荐指数
3
解决办法
2万
查看次数

标签 统计

compatibility ×1

python ×1

python-2.7 ×1