Skip to main content

An instance method decorator that also works as a classmethod.

Project description

#Dynamic class and instance methods!
This simple module creates a class method that will also work as an instance method.

import dynamicmethod

class Example(object):

x = 1 # Default classmethod value

def __init__(self, x=0):
self.x = x

def get_x(self):
return self.x

ex = Example()
ex.x = 5

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
dynamicmethod-1.0.3.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None

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