Guest User

Untitled

a guest
Feb 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. # Esta parte hace esto
  2. lookup = '__'.join(['name', 'isnull']) # name__isnull simplemente construye este string
  3.  
  4. # Esto ni lo explico .i.
  5. def test(name__isnull, name):
  6. print('arg: '+ str(name__isnull))
  7. print('name: '+ name)
  8.  
  9. print('lookup: '+ lookup)
  10.  
  11. # Esto es equivalente a esto
  12. # test(name=vinicio, name__isnull=False)
  13. test(**{'name': 'vinicio', lookup: False})
Add Comment
Please, Sign In to add comment