Skip to content

Commit

Permalink
Remove an incorrect comment about the Python struct module.
Browse files Browse the repository at this point in the history
"<I" has always been defined as little endian 32-bit unsigned int.
https://docs.python.org/3/library/struct.html#format-characters

PiperOrigin-RevId: 485963034
  • Loading branch information
gpshead authored and copybara-github committed Nov 3, 2022
1 parent 2326aef commit 9fe9adf
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions conformance/conformance_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ def do_test_io():
elif len(length_bytes) != 4:
raise IOError("I/O error")

# "I" is "unsigned int", so this depends on running on a platform with
# 32-bit "unsigned int" type. The Python struct module unfortunately
# has no format specifier for uint32_t.
length = struct.unpack("<I", length_bytes)[0]
serialized_request = sys.stdin.read(length)
if len(serialized_request) != length:
Expand Down

0 comments on commit 9fe9adf

Please sign in to comment.