24 ms·
Amusingly, your pythonic example isn't even pythonic. The first line should read def foo(*args):
by johnloeber 12y ago
Amusingly, your pythonic example isn't even pythonic. The first line should read def foo(*args):
- afandian 12y agoWhy? If a, b and c are separate args why not name them? Especially if they're of different types (as per second example).
- deleted 12y ago[deleted]
- afandian 12y agoSure, but isn't the comment obviously a demonstration of formal parameter syntax rather than functionality? Surely the more idiomatic Python would be not to write the function at all if it does nothing (and then there's no example code to illustrate with).