我应该能够将一个高达 ( 2**64
)-1 的值转换为一个零填充的 16 位十六进制半字节字符串......那么为什么当我达到超过的大小时会出现以下错误2**52
?
>>> a = "{:016X}".format(2**52)
>>> a = "{:016X}".format(2**53)
Traceback (most recent call last):
File <string>, line 1, in <module>
TypeError: non-empty format string passed to object.__format__
这是否与 Brython 的限制有关,它将事物转换为 javascript?(因为我在这里的 Brython REPL 中得到了那个错误,但在本地正常的 Python3 REPL 中没有)