1

If I for example want to let the user to input any type to the function except list is there a way I can do that?

in pseudocode:

def some_func(arg: AllTypesExceptOne(list)) -> None:
    print(arg)
  • Out of curiosity, why do you want to do this? Seems smelly to me. What if I have a custom type that looks exactly like a `list`? – 0x5453 Oct 26 '21 at 15:31
  • @0x5453 i need to append any other data than list to a list, but all good now –  Oct 26 '21 at 17:25

0 Answers0