Skip to content

Type Hint the Python 3.8 LRU Cache Example #1253

Discussion options

You must be logged in to vote

I don't think PEP 646 is useful here. The *args/**kwargs are forwarded to the OrderedDict constructor, which appears to be the same as the dict constructor (according to typeshed). So a precise type signature would simply duplicate the dict.__init__ signature: https://github.com/python/typeshed/blob/8a47a28e768c577385d6232d4afea496b60403e7/stdlib/builtins.pyi#L1022.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@adam-grant-hendry
Comment options

@adam-grant-hendry
Comment options

Answer selected by adam-grant-hendry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants