Last active
May 17, 2018 16:09
-
-
Save lowlevel-1989/0755d9762947c77742a0141a584ad83e to your computer and use it in GitHub Desktop.
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
# Esta parte hace esto | |
lookup = '__'.join(['name', 'isnull']) # name__isnull simplemente construye este string | |
# Esto ni lo explico .i. | |
def test(name__isnull, name): | |
print('arg:', str(name__isnull)) | |
print('name:', name) | |
print('lookup:', lookup) | |
# Esto es equivalente a esto | |
# test(name=vinicio, name__isnull=False) | |
test(**{'name': 'vinicio', lookup: False}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment