Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_object_type(value_list):
- """
- value_list: an array of String class name reprentation
- return: the first string represents Lime object class, not relation class
- """
- if not value_list:
- raise ValueError('Search to end, no object type found')
- try:
- t = locate(value_list[0]) # Use locate to get type from string representation
- except ValueError:
- print('Bad input string provided')
- if (t is not a relation type):
- return t
- else (t is a relation type):
- return get_object_type(value_list[1:])
Add Comment
Please, Sign In to add comment