Determine if object is a Bound or Unbound method



Hi,

I have an object and I want to check if it is a bound or unbound method, or neither. I tried using the types module, but it seems as though types.UnboundMethodType and types.MethodType are equal. How else can I determine this? BTW, I'm using Python 2.3

Thanks,

Farshid
.



Relevant Pages

  • Re: Unification of Methods and Functions
    ... >would have the greatest concentration of unbound method use (my reasoning was ... staticmethod syntax is relatively new, and there is a long tradition ... in Python of using various alternatives to static methods. ...
    (comp.lang.python)
  • Re: How to organise classes and modules
    ... this is my first mail to the list so please correct me if Ive done ... First point is that Python doesn't force you to put everything in ... unbound method bar() must be called with Foo instance as ... Modules are namespaces, classes are ...
    (comp.lang.python)
  • Re: How to organise classes and modules
    ... What Im trying to figure out is a good way to organise my code. ... First point is that Python doesn't force you to put everything in ... unbound method bar() must be called with Foo instance as ... Modules are namespaces, classes are ...
    (comp.lang.python)
  • How to organise classes and modules
    ... unbound method bar() must be called with Foo instance as ... Very clean from the outside. ... Maybe its not that important in python but from what Ive ...
    (comp.lang.python)
  • Re: Unification of Methods and Functions
    ... There is a lot om implicity ... >> a big implicite way to handle things in python. ... func at 0x00A89530>, <unbound method Cat.func>) ... I still favor Python's implicit binding over the ...
    (comp.lang.python)