Skip to main content

Set a Python property using a function call

Project description


Build Status Code style: black

Caller is a little library for calling a property as a regular function.


Install using pip:

$ pip install caller


from caller import property

class Foo(object):
    def __init__(self, bar):
        self._bar = bar

    def bar(self):
        return self._bar

    def bar(self, new_bar):
        self._bar = new_bar

foo = Foo('bar')'new bar')



new bar

Or with a separate caller

class Foo(object):
    def bar(self, new_bar):
        self._bar = new_bar[::-1]

Foo('bar').bar('new bar')


rab wen

That's all.

Project details

Download files

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

Files for caller, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size caller-0.0.2.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page