@self decorator makes method return self (jQuery-like chaining)
Project description
Install
[sudo] pip install self
Usage
>>> class CLS:
@self
def method(self):
print("test")
@self
def method2(self):
print("test")
>>> CLS().method().method2() # jQuery like chain
Example
>>> from self import self
>>> @self
def method(self):
Sources:
russianidiot.github.io/python/ - Python packages
russianidiot.github.io/cli/ - command line scripts
README.rst - generated with readmemako.py (python+ mako templates) and .README dotfiles
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.8.tar.gz
(6.4 kB
view hashes)