The modul fkr offers the function newkey. With newkey you can create new functions with new fixed keywords.
For example:
def apple( x, fruit = ‘strawberry’):
print( x )
print( fruit)
>>>apple(‘An apple is an:’ )
An apple is an:
strawberry
betterapple = fkr.newkey(apple, fruit = ‘apple’)
>>>betterapple(‘An apple is an:’)
An apple is an:
apple
Attention! Once you replaced fruit you can’t replace it anymore in the new function.
If there are some Bugs please let me know: masatamara@googlemail.com
Release files for fkr 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fkr-1.0.0.zip | 980 Bytes | Details |
Release files / fkr-1.0.0.zip
| Download URL | fkr-1.0.0.zip |
|---|---|
| Size | 980 Bytes |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf8392a0ef0804f1a12f44268cd4565dd667de5f5dd45f21c80a301ae7e0c350
|
|
BLAKE2b-256 checksum How to use checksums |
d1966214950ddea635277507f2b36716f36e03eda501fd93f3a7d7650b212544
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |