@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):
Example
>>> class CLS:
@self
def method(self):
print("test")
@self
def method2(self):
print("test")
>>> 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-0.0.13.tar.gz
(2.3 kB
view hashes)