We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38bcc1f commit ad2d1fdCopy full SHA for ad2d1fd
python/flatbuffers/packer.py
@@ -13,8 +13,7 @@
13
# limitations under the License.
14
15
"""
16
-Provide pre-compiled struct packers for encoding and decoding, as well as
17
-a method to vectorize a pre-compiled packer.
+Provide pre-compiled struct packers for encoding and decoding.
18
19
See: https://docs.python.org/2/library/struct.html#format-characters
20
@@ -41,11 +40,3 @@
41
40
uoffset = uint32
42
soffset = int32
43
voffset = uint16
44
-
45
-def _vectorize_packer(packer, n):
46
- if packer.format[0] not in '@=<>!':
47
- raise ValueError('Flatbuffers only supports endian-safe data.')
48
- if len(packer.format) != 2:
49
- raise ValueError('Flatbuffers only supports vectors of scalar types.')
50
- fmt = packer.format[0] + str(n) + packer.format[1]
51
- return struct.Struct(fmt)
0 commit comments