While I am reading the book "Using Asyncio in Python 3" I encountered a line of def definition such as below. There is "to:" keyword inside the def parenthesis and it seems like ":" here is different with "=" but I couldn't figure out what ":" is and for what purpose.
What is "to:" in below code?
@attrs
class Cutlery:
knives = attrib(default=0)
forks = attrib(default=0)
def give(self, to: 'Cutlery', knives=0, forks=0):
self.change(-knives, -forks)
to.change(knives, forks)
def change(self, knives, forks):
self.knives += knives
self.forks += forks