changeset 627:870af8d51552

STUB: python/example/classes.py
author Jeff Hammel <k0scist@gmail.com>
date Tue, 18 Feb 2014 20:09:42 -0800
parents 89a72399286b
children 08574641d801
files python/example/classes.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/python/example/classes.py	Mon Feb 17 17:33:23 2014 -0800
+++ b/python/example/classes.py	Tue Feb 18 20:09:42 2014 -0800
@@ -7,9 +7,13 @@
 class A:
     pass
 
-tests = ["issubclass(A, A)"]
+tests = ["issubclass(A(), A)",
+         "issubclass(A, A)"]
 
 if __name__ == '__main__':
     for test in tests:
         print ("? {}".format(test))
-        print (eval(test))
+        try:
+            print (eval(test))
+        except Exception as e:
+            print ('{}'.format(repr(e)))