/mypy-guide-args-kwargs-1.py Secret
Created
May 5, 2021 09:28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def i_can_take_any_values(*args, **kwargs): | |
print('got args:', args) | |
print('got kwargs:', kwargs) | |
i_can_take_any_values(1, 16, 'Hello', x=False, answer=42) | |
# Output: | |
# got args: (1, 16, 'Hello') | |
# got kwargs: {'x': False, 'answer': 42} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment