"list-like datatype alowing floating point indices and slices"
Project description
cursed_dataypes is a library offering cursed variations of standard Python datatypes (so far limited to cursed_list)
What is cursed about this list?
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.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cursed_datatypes-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9236da9978835c0cc79518de72f791f3de3af7db2554a2efff1213f6a8d19b87 |
|
MD5 | 0ab4a1b9dc8848d955630f4c2b3bb571 |
|
BLAKE2b-256 | 3c8f29ba41e09116090a6047bbed8b60645fbcea0c541de67282528ac92a61f4 |