+ 3
HELP plz , python class & function
I saw this example but I don't know how the function would work!! my problem is in this line : def send(self, data: bytes) -> bytes: could somebody explain what happens in this function??(spatially in this part: "data: bytes) -> bytes:") class CommunicationChannel(object): def __init__(self, args): self.args = args def send(self, data: bytes) -> bytes: raise NotImplementedError()
2 Respostas
+ 3
okay I got it
object is a parent for all of the python classes
and ":" is to define input type and "->" is to define the output type
+ 5
Yes