Skip to content

Instantly share code, notes, and snippets.

@hj91
Created June 2, 2013 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hj91/5693320 to your computer and use it in GitHub Desktop.
Save hj91/5693320 to your computer and use it in GitHub Desktop.
a simple example of using isinstance in Python
class A:
def __init__(self,a):
self.a=a
print self.a
def show(self):
print self.a
a=A(1)
a.show()
print isinstance(a,A)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment