Skip to main content

isstaticmethod(object) function - True if object is staticmethod

Project description

Install

$ [sudo] pip install isstaticmethod

Usage

>>> from isstaticmethod import isstaticmethod

>>> isstaticmethod(obj)

Examples

>>> class CLS:
		@classmethod
		def classmethod(cls,x):
			print("executing class_foo(%s,%s)" % (cls,x))

		@staticmethod
		def staticmethod(x):
			print("executing static_foo(%s)" % x)

>>> isstaticmethod(CLS.staticmethod)
True

>>> isstaticmethod(CLS.classmethod)
False

Sources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
isstaticmethod-1.0.2.tar.gz (1.4 kB) Copy SHA256 hash SHA256 Source None May 16, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page