flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

[Python] Missing (key) and Dictionary support

Open CTVjweiss opened this issue 3 years ago • 1 comments

FlatBuffers in other languages supports a Dictionary-esque type using binary search and sorted string keys. See FlatBuffers C++ docs for details.

I'm trying to build a binary file with Python and consume it in C#, and while the C# consumer supports the key lookup, the Python code for building the binary does not.

If I sort the entries in Python before adding them, this should in theory work, if Python's string sorting is equivalent to the binary string comparison done in the C#/C++/etc. implementations (see Table.cs for C# implementation).

It would be great if the Python implementation supported this functionality.

CTVjweiss avatar May 03 '22 15:05 CTVjweiss

Feel free to submit a PR for this.

dbaileychess avatar May 11 '22 16:05 dbaileychess

This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.

github-actions[bot] avatar Mar 04 '23 01:03 github-actions[bot]

This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.

github-actions[bot] avatar Mar 19 '23 20:03 github-actions[bot]