Mercurial > hg > config
view python/example/classes.py @ 626:89a72399286b
adding file demonstrating classes
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 17 Feb 2014 17:33:23 -0800 |
parents | |
children | 870af8d51552 |
line wrap: on
line source
#!/usr/bin/env python """ illustrate how classes work """ class A: pass tests = ["issubclass(A, A)"] if __name__ == '__main__': for test in tests: print ("? {}".format(test)) print (eval(test))