I should be able to turn a value up to (2**64
)-1 into a zero-padded, 16-hex-nibble string... So why does the below error out when I get up to a size beyond 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__
Could this have to do with limitations in Brython, which is converting things to javascript? (Because I get that error in the Brython REPL here, but not in a local normal Python3 REPL)
Looks like the developers confirmed it was a bug: https://github.com/brython-dev/brython/issues/1624