diff --git a/python/flatbuffers/flexbuffers.py b/python/flatbuffers/flexbuffers.py index aaa02fdaf..34d42a698 100644 --- a/python/flatbuffers/flexbuffers.py +++ b/python/flatbuffers/flexbuffers.py @@ -75,7 +75,7 @@ class BitWidth(enum.IntEnum): @staticmethod def F(value): """Returns the `BitWidth` to encode floating point value.""" - if struct.unpack('f', struct.pack('f', value))[0] == value: + if struct.unpack('