cursed_dataypes is a library offering cursed variations of standard Python datatypes (so far limited to cursed_list)
install: pip install cursed-datatypes
import: from cursed_datatypes import cursed_list, cursed_tuple
What is cursed about these datatypes?
well, you know how you absolutely never thought "I wonder what element 2.345 of this list is"?
cursed_list allows you to find out!
cursed_list extends the builtin list type to allow floating point indices, or floating point slices.
It interpolates the values of the list elements to get these fractional elements;
e.g. cursed_list([1,2,3])[0.333]) would give 1.333
floating point slices work similarly, including if the step is a float
Note: this means the number of elements of a slice of a cursed_list can be more than the length of the original cursed_list object.
cursed_tuple works similarly, except it is immutable.
Limitations:
Can only assign to cursed_list slices as if it were a normal list; no floats
Can't handle complex number indices - I have no idea what that should even look like
Where should I use this?
You probably shouldn't, definitely not for anything serious.
The whole point of this is to be like nails on a chalkboard for programmers.
Metadata
Release files for cursed-datatypes 0.1.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 | |
|---|---|---|---|
| cursed-datatypes-0.1.0.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cursed_datatypes-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.8 kB
Release files / cursed-datatypes-0.1.0.tar.gz
| Download URL | cursed-datatypes-0.1.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
588879413652c99b7c1db3834eaab65587eb97db985ef5aac5c1376f604830f6
|
|
BLAKE2b-256 checksum How to use checksums |
6f1fce5286ceaa929e685593de7e16f9d6f6c373e1a1ef8b1bf8a668eb4d83b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.7
|
Release files / cursed_datatypes-0.1.0-py3-none-any.whl
| Download URL | cursed_datatypes-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af08acc9c663029c7797f3f04468a16537035f65a4b65c097fa3f35226d0041e
|
|
BLAKE2b-256 checksum How to use checksums |
57ff217d5ccf76494471524370885f17dbbc22cda05b4f6898afb88710661272
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.7
|