Skip to content

Instantly share code, notes, and snippets.

@lowlevel-1989
Last active May 17, 2018 16:09
Show Gist options
  • Save lowlevel-1989/0755d9762947c77742a0141a584ad83e to your computer and use it in GitHub Desktop.
Save lowlevel-1989/0755d9762947c77742a0141a584ad83e to your computer and use it in GitHub Desktop.
# 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