def create_msg(content: bytes) -> bytes:
size = len(content)
return encode_msg_size(size) + content
def encode_msg_size(size: int) -> bytes:
return struct.pack("<I", size)
I want to migrate this two functions from python3 to python2.7 but i got everytime a syntax error. Does somebody has any idea?
Error:
File "__init__.py", line 4 def create_msg(content: bytes) -> bytes: SyntaxError: invalid syntax