Skip to content

Instantly share code, notes, and snippets.

@aeppert
Created July 17, 2015 14:30
Show Gist options
  • Save aeppert/1fda3505ea2376547e49 to your computer and use it in GitHub Desktop.
Save aeppert/1fda3505ea2376547e49 to your computer and use it in GitHub Desktop.
Access Class Name Internally.
#!/usr/bin/python
class testing:
def __init__(self):
pass
def get_name(self):
return self.__class__.__name__
t = testing()
print 't\'s class name is - \"%s\"' % (t.get_name())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment