这个一个对函数进行各方面操作的包,包含了很多十分精妙的功能。
这个包分了几个大的模块,分别对应了不同的函数操作小玩法
装饰器
装饰器部分包含了常见一个装饰器所需的一些辅助类的装饰器函数
wraps
这个装饰器本质就是为了替代functools.wraps而创建的。
它的作用和functools.wraps本质上是一样的,唯一的区别就是它在装饰了函数之后,会把函数的参数和注释全部保留,使得在运行过程中可以正确获得原函数的参数情况。
函数
函数是针对函数直接或间接的一些操作的功能
replace_function
替代函数,其本身是为了解决需要直接改变builtin函数的逻辑(对,就是你,print),但是又希望这个函数的变动可以随时复原,或者能自由地调用原函数地功能。
不过现在这个函数已经被开发得可以任意替换任意包内定义的普通函数
from movoid_function import replace_function
def special_print(text):
return text
replace_function(print, special_print)
a = print("666") #此时不会打印任何信息,并且会给a赋值为'666'
Metadata
Release files for movoid-function 1.9.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 | Provenance | Actions |
|---|---|---|---|---|
| movoid_function-1.9.0.tar.gz | 19.5 kB | Without provenance | Details for movoid_function-1.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| movoid_function-1.9.0-py3-none-any.whl | Python 3 | none | any | Details for movoid_function-1.9.0-py3-none-any.whl |
Total release size: 40.5 kB
Release files / movoid_function-1.9.0.tar.gz
| Download URL | movoid_function-1.9.0.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2b5c15a8b24ecd4bd0223e7e6f80f7c335ea391843616da2ee23ba09ecb8f52
|
|
BLAKE2b-256 checksum How to use checksums |
586cc38a329f9d80a8fe2f54f69ac453685c3e7d3238695373492a367569ea3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / movoid_function-1.9.0-py3-none-any.whl
| Download URL | movoid_function-1.9.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9045a9d931f47614ff636b94ba62b0bdf4fd73cb24d96d17583a818aa0c5ae54
|
|
BLAKE2b-256 checksum How to use checksums |
9cba473356185f6a99d151bd7ada833d4fd47356213c932bc13dc708662e4ceb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for movoid-function 1.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.