Guest User

Untitled

a guest
Jun 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. def get_object_type(value_list):
  2. """
  3. value_list: an array of String class name reprentation
  4. return: the first string represents Lime object class, not relation class
  5. """
  6. if not value_list:
  7. raise ValueError('Search to end, no object type found')
  8. try:
  9. t = locate(value_list[0]) # Use locate to get type from string representation
  10. except ValueError:
  11. print('Bad input string provided')
  12.  
  13. if (t is not a relation type):
  14. return t
  15. else (t is a relation type):
  16. return get_object_type(value_list[1:])
Add Comment
Please, Sign In to add comment