4 ms·
> Yes, how am I going to know what types I can pass to mean instead? Oh, if I'm writing it for you (ie. I'm writing a library) then I'll put documentation (pro
by globular-toast 2y ago
> Yes, how am I going to know what types I can pass to mean instead?
Oh, if I'm writing it for you (ie. I'm writing a library) then I'll put documentation (probably as type annotations, as I said in the first half of my comment). But a lot of code I write is just for me, or is going to be part of a completely self-contained project and it would be obvious from context what to pass. Like I said, it's a judgement call that Python expects you to be able to make.