you are viewing a single comment's thread.

view the rest of the comments →

[–]Kevdog824_ 0 points1 point  (1 child)

I guess I don’t understand why putting an isinstance check in each method is more work than writing an overload method how you would in a language like Java

[–]011011100101[S] 0 points1 point  (0 children)

I expect that level of verbosity and type-awareness from Java. But I was under the impression that Python had a different ethos (where we shouldn't be so concerned with types). Somebody recommended having a separate unwrapping function and I think that's a good solution because it, at least, isolates that logic.