Cleanup: add a comment to explain EndianIO::accepted_types

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2022-03-25 12:01:39 +01:00
parent 6bfa4062d7
commit 973bf741c7

View File

@ -197,6 +197,12 @@ class EndianIO:
@classmethod @classmethod
def accepted_types(cls): def accepted_types(cls):
"""Return a mapping from type name to writer function.
This is mostly to make it easier to get the correct number write
function, given that Python's `int` and `float` can map to a whole range
of C types.
"""
return { return {
b"char": cls.write_char, b"char": cls.write_char,
b"ushort": cls.write_ushort, b"ushort": cls.write_ushort,