Has Python 3 to_bytes been back-ported to python 2.7?

前端 未结 4 1298
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 12:07

This is the function I\'m after: -

http://docs.python.org/3/library/stdtypes.html#int.to_bytes

I need big endianness support.

4条回答
  •  囚心锁ツ
    2020-11-30 12:36

    To answer your original question, the to_bytes method for int objects was not back ported to Python 2.7 from Python 3. It was considered but ultimately rejected. See the discussion here.

提交回复
热议问题