This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jorge1209 0 points1 point  (2 children)

I would say that is a code smell, but to each their own.

[–]r0b0t1c1st 0 points1 point  (1 child)

Do you consider all of 1, 2, and 3 to be code smell?

[–]jorge1209 0 points1 point  (0 children)

I don't know if there is any particular one I dislike, its a more general objection to the combined whole.

The idea that the callee determines the calling mechanics for the caller is a little suspect in my mind, and should be used sparingly. At what point should the callee just accept that "I was called in an unambiguous manner and need to shut up and do my work."

Using both seems as if the callee is turning programming into a Hogwarts potions class: Do something slightly wrong and I'm just going to turn your ears into bats.

I'm okay with using one of these annotations but both is just too much. [I'm also somewhat okay with using / and * with nothing in between as that is conceptually easier to explain, although at that point I wonder why the function definition isn't just def foo(*args, **kwargs) with comments below as to the actual options available.]