introduce search interface
This commit is contained in:
6
testgetattr.py
Normal file
6
testgetattr.py
Normal file
@@ -0,0 +1,6 @@
|
||||
class A():
|
||||
def b(self):
|
||||
return "Hello"
|
||||
a=A()
|
||||
print(callable(getattr(a,"b")))
|
||||
print(getattr(a, "b")())
|
||||
Reference in New Issue
Block a user