Created
November 30, 2018 03:33
-
-
Save John-Gee/e55078b9eea523d33821c83bbc07e5f4 to your computer and use it in GitHub Desktop.
wrapper
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
# Taken from aiocache at https://github.com/argaen/aiocache/ | |
# Copyright (c) 2016, Manuel Miranda de Cid | |
# License at https://github.com/argaen/aiocache/blob/master/LICENSE.txt | |
def key_from_args(func, args, kwargs): | |
ordered_kwargs = sorted(kwargs.items()) | |
return ( | |
(func.__module__ or "") | |
+ func.__name__ | |
+ str(args) | |
+ str(ordered_kwargs) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment