Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

getclass(object) function - get object class

Project description

Install

$ [sudo] pip install getclass

Usage

>>> from getclass import getclass

>>> getclass(obj)

Examples

>>> class CLS:
    def method(self): pass
    @property
    def property(self): pass
    @classmethod
    def classmethod(cls,x): pass
    @staticmethod
    def staticmethod(x): pass
    def __str__(self): pass

>>> getclass(CLS())
<class __main__.CLS>

>>> getclass(CLS.method)
<class __main__.CLS>

>>> getclass(CLS.property)
<class __main__.CLS>

>>> getclass(CLS.classmethod)
<class __main__.CLS>

>>> getclass(CLS.staticmethod)
<class __main__.CLS>

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
getclass-1.0.3.tar.gz (1.8 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 SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page