Lichen

tests/methods_unbound.py

231:72b93c7c757a
2016-11-24 Paul Boddie Added issubclass and improved isinstance, also introducing various native functions and operations.
     1 class C:     2     def m(self, x):     3         return x     4      5 def f(obj, i):     6     if i:     7         return obj.m(i)     8     else:     9         return obj.m    10     11 c = C()    12 #print f(C, 1)                 # NOTE: Need to raise and handle error.    13 fn = f(C, 0)    14 print get_using(fn, c)(2)      # 2    15 print get_using(f(C, 0), c)(2) # 2