@self decorator makes method return self (jQuery-like chaining)
Project description
Install
$ [sudo] pip install self
Usage
>>> from self import self
>>> @self
def method(self):
Examples
>>> class CLS:
@self
def method(self):
print("test")
@self
def method2(self):
print("test")
>>> CLS().method().method2() # jQuery like chain
Sources
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-1.0.2.tar.gz
(1.3 kB
view hashes)