selfless
A small experimental, work-in-progress, module for implicit “self” support in Python (in some restricted contexts), targeting Python 2.7 (if possible) and 3.6+.
Documentation and explicit examples will be added when the module is more mature. This is used as a dependency for another module; when that module is made public, the existence of this module will be justified.
What is this?
If you don’t know, you probably don’t need it. It can be used as an example of AST transformer though.
In some contexts (this will be clarified in the future), writing and reading self. polutes the code and can be cumbersome. This module tries to alleviate that in some specific contexts.
How does it work?
This module inspects the source code of a class, extracts its AST and inserts self. for variables in a list (if provided) or variables not in the global and local contexts at the time of import.
Finally, the transformed AST is compiled and inserting into the original context of the class selfless was applied to.
I’m also trying to restrict the transform to the ``with`` keyword but it’s a work-in-progress.
Metadata
Release files for selfless 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| selfless-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for selfless-0.0.3-py3-none-any.whl |
| selfless-0.0.3-py2-none-any.whl | Python 2 | none | any | Details for selfless-0.0.3-py2-none-any.whl |
Total release size: 10.3 kB
Release files / selfless-0.0.3-py3-none-any.whl
| Download URL | selfless-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
240aea6106aed4bb7bc2c922dd8aca1ec2e517fc7334e7721b769130175b2778
|
|
BLAKE2b-256 checksum How to use checksums |
31a40143f49fbd6b866a0bbb105b52009b26b5237bf1026e78bfa788613fd29d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / selfless-0.0.3-py2-none-any.whl
| Download URL | selfless-0.0.3-py2-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
c31b4a9fcb454dfd85a3ec035101712506aaf53ed85b650cb582f06729c5ef4e
|
|
BLAKE2b-256 checksum How to use checksums |
cbfdd503615ec0c7f76ab3820913ed7377d82a3de567dce1b64b42d640e707bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for selfless 0.0.3
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.