def constants(self):
ret = {}<EOL>name = self.__class_name.split('<STR_LIT:.>')[-<NUM_LIT:1>]<EOL>constant_class = getattr(self.__module, name)<EOL>for name, value in constant_class.__dict__.items():<EOL><INDENT>if re.match(r'<STR_LIT>', name):<EOL><INDENT>ret[name] = value<EOL><DEDENT><DEDENT>return ret<EOL>
Gets the constants from the class that acts like a namespace for constants.

:rtype: dict<str,*>