@self decorator makes method return self (jQuery-like chaining)
Project description
Installation
$ [sudo] pip install self
Functions
function | __doc__ |
---|---|
self.self(method, *args, **kwargs) |
@self method decorator to return self object |
Examples
>>> from self import self
>>> class CLS:
@self
def method(self):
...
@self
def method2(self):
...
>>> CLS().method().method2() # jQuery like chain
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
self-2019.4.13.tar.gz
(1.4 kB
view hashes)