%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/hamcrest/core/helpers/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/hamcrest/core/helpers/hasmethod.py

__author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"


def hasmethod(obj: object, methodname: str) -> bool:
    """Does ``obj`` have a method named ``methodname``?"""

    if not hasattr(obj, methodname):
        return False
    method = getattr(obj, methodname)
    return callable(method)

Zerion Mini Shell 1.0