79244590

Date: 2024-12-02 15:17:30
Score: 5
Natty: 4.5
Report link

Since I do not have the reputation to comment, I need to put this as a separate answer. I had a similar issue where I wanted to strongly type my variables for a unpacked tuple but I wanted to use a throwaway underscore to ignore the returns of one of part of my tuple. This can be done like the accepted answer with bare annotations of the variables you want to keep (eg. variable: variable_type) above the assignment before your tuple unpacking (eg. _, variable = tuple).

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): to comment
  • RegEx Blacklisted phrase (1.5): I do not have the reputation to comment
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: CSinginGeek