| Server IP : 104.26.1.14 / Your IP : 104.23.243.221 Web Server : nginx/1.30.3 System : Linux vps-a1214830 7.0.0-27-generic #27-Ubuntu SMP PREEMPT_DYNAMIC Thu Jun 18 19:13:49 UTC 2026 x86_64 User : bangkokfinder ( 1002) PHP Version : 8.2.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/hamcrest/core/helpers/ |
Upload File : |
__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)