Compute implied arguments for your functions
Project description
Recommended example usage
import superfilter
from argskwargs import argskwargs
@superfilter
def myfilter():
return argskwargs(foo="foobar", message="Hello World!")
@myfilter
def myfunction(foo, message):
print(message)
return foo
myfunction() # Arguments are supplied by 'myfilter'
Usage with other decorators
import superfilter
from argskwargs import argskwargs
@superfilter
def myfilter(cls):
return argskwargs(cls, foo="foobar", message="Hello World!")
class MyClass:
@classmethod
@myfilter # Decorate with myfilter first
def myfunction(cls, foo, message):
print(message)
return foo
MyClass.myfunction()
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
superfilter-1.0.1.tar.gz
(1.8 kB
view details)
File details
Details for the file superfilter-1.0.1.tar.gz
.
File metadata
- Download URL: superfilter-1.0.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c72eae6508ee169165c2c07592288a1691a880e084ff0d4dabd4e0b664e64f5d |
|
MD5 | 9db507ecf00354a67cde1fa58f935817 |
|
BLAKE2b-256 | b95358d2fe00e50ca70863fb85583f4428a189e7362977f9ab09e6b559429eb7 |