2

Looking at the answer given here

example:

def md5_checksum_table(dir_name: str, suffix: str) -> {bytes: [str]}:

This is the first time I see -> used, and I do not understand what this does. I have tried to search in documenation, but failed to find the relevant description of this.

Can anyone explain to me what this is/does ?

Community
  • 1
  • 1
Edwin van Mierlo
  • 2,398
  • 1
  • 10
  • 19
  • I appreciate that this was a duplicate indeed, however I tried to search with multiple search strings on SO, and it did not reveal the post from 3.5 years ago. Thanks. – Edwin van Mierlo Oct 06 '16 at 11:21

1 Answers1

6

It's a type hint, used to denote what type the method returns.

Macke
  • 24,812
  • 7
  • 82
  • 118