Advertisement
Guest User

Untitled

a guest
May 17th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import inspect
  2.  
  3. def search(code=None, id=None, bobo=None):
  4.   frame = inspect.currentframe()
  5.   _, _, _, values = inspect.getargvalues(frame)
  6.   one_is_set = False
  7.   for key in ['code', 'id', 'bobo']:
  8.     if values[key] != None:
  9.       if one_is_set == True:
  10.         print("fuck this")
  11.         return
  12.       else:
  13.         one_is_set = True
  14.  
  15.   if one_is_set == False:
  16.     print("fuck that")
  17.     return
  18.  
  19.   print(values)
  20.  
  21. search(code="41", id="42")
  22. search(bobo="5")
  23. search()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement