TIL: How to type args and kwargs
Read OriginalThis article details the common mistake of typing *args as a tuple and **kwargs as a dict in Python. It explains that the correct approach is to type the values within these containers directly (e.g., *args: str, **kwargs: Any) for compatibility with type checkers, and credits Will McGugan for the explanation.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser