Skip to main content

@self decorator makes method return self (jQuery-like chaining)

Project description

Install

$ [sudo] pip install self

Functions

function description
self.self(method, self, *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

readme-md - README.md generator

Project details


Download files

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

Source Distribution

self-2018.11.20.tar.gz (1.3 kB view hashes)

Uploaded Source

Built Distribution

self-2018.11.20-py2.py3-none-any.whl (11.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page