Re: instance method questions

2007-08-22 Thread Peter Otten
Danny wrote: > I have created an instance method for an object using new.instancemethod. > It works great. Now the questions are: > > 1) how do I dynamically inspect an object to determine if it has an > instance method? (there is a class method with the same name) Why would you want to do that?

Re: instance method questions

2007-08-22 Thread Frederick Polgardy
On Aug 22, 10:23 am, Danny <[EMAIL PROTECTED]> wrote: > 1) how do I dynamically inspect an object to determine if it has an instance > method? (there is a class method with the same name) class Foo: def foo(self): pass x = Foo() import types >>> isinstance(x.foo, types.MethodType) T

instance method questions

2007-08-22 Thread Danny
howdy, I have created an instance method for an object using new.instancemethod. It works great. Now the questions are: 1) how do I dynamically inspect an object to determine if it has an instance method? (there is a class method with the same name) 2) how do I dynamically delete the instance m