Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def is_instancemethod(desc, name=_Unset):
    '''Returns true if a given `method` is neither a static method nor a class
    method.

    This function takes the same arguments as :func:`is_classmethod`.

    '''
    from types import FunctionType
    if name:
        desc = mro_dict(desc).get(name, None)
    return isinstance(desc, FunctionType)
        


src/x/o/xoutil-1.5.4/xoutil/proxy.py   xoutil(Download)
    def __getattribute__(self, attr):
        from functools import partial
        from xoutil.types import is_instancemethod
 
        def get(name, default=Unset):
        if not behaves:
            behaves = ()
        valid_wrapper = lambda b: is_instancemethod(b, attr)
        wrapper = next((b for b in behaves if valid_wrapper(b)), None)
        if wrapper:

src/x/o/xoutil-1.5.4/xoutil/aop/classical.py   xoutil(Download)
def bind_method(method, *args, **kwargs):
    '''Returns the method to be called already bound to self if needed'''
    from xoutil.types import is_instancemethod, is_classmethod, is_staticmethod
    if args and is_instancemethod(method):
        self = args[0]