MCPcopy Create free account
hub / github.com/datacamp/pythonwhat / get_identifier

Method get_identifier

pythonwhat/parsing.py:834–843  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

832
833 @staticmethod
834 def get_identifier(obj):
835 # if only name needs to be correct
836 return getattr(obj, "id", None) or getattr(obj, "attr")
837 # if full attr chain must match
838 # name = ""
839 # while hasattr(obj, "attr"):
840 # name = "." + obj.attr + name
841 # obj = obj.value
842 # name = obj.id + name
843 # return name
844
845 @staticmethod
846 def parse_handler(handler):

Callers 1

visit_TryMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected