peng3d/util/__init__.py
def normalizeName(self,in_name):
        """
        Takes in an object and normalizes it to its name/string.
        
        Currently, only integers and strings may be passed in, else a :py:exc:`TypeError`
        will be thrown.
        """
        if isinstance(in_name,str):
            assert in_name in self._data["reg"].inv
            return in_name
        elif isinstance(in_name,int):
            assert in_name in self._data["reg"]
            return self._data["reg"][in_name]
        else:
            raise TypeError("Only int and str can be converted to names")
def normalizeName(self,in_name):
        """
        Takes in an object and normalizes it to its name/string.
        
        Currently, only integers and strings may be passed in, else a :py:exc:`TypeError`
        will be thrown.
        """
        if isinstance(in_name,str):
            assert in_name in self._data["reg"].inv
            return in_name
        elif isinstance(in_name,int):
            assert in_name in self._data["reg"]
            return self._data["reg"][in_name]
        else:
            raise TypeError("Only int and str can be converted to names")
Takes in an object and normalizes it to its name/string.
        
        Currently, only integers and strings may be passed in, else a :py:exc:`TypeError`
        will be thrown.