| Post Reply | RetroFed Forum Forum Index » Python |
| Author | Message | ||
|---|---|---|---|
|
Vulwsztyn
programming.dev
Vulwsztyn@programming.dev Joined: 2023-11-12 |
Links: I created it mainly as a proof of concept that python's typing system is mature enough to support such a thing. The process was fun and I was able to help make remeda.js docs a bit better The library is as typed as possible with my knowledge of python typing system, which means dict typing is kinda meh, but for iterables it is as good as in TS. I decided to publish 1.X, since I've been adding a lot of stuff that "absolutely must be in 1.X" and got tired of the scope creep, so there is a bunch of TODOs, but they are "nice to have"s. I'm planning to work on the TODOs and making the docs better now that I've managed to release it. About the library: It supports what remeda.js calls "data-first" and "data-last" approaches to calling functions. That means:
which allows for a "fun" function composition:
Features:
|
||
| 22 Original | |||
lime!
feddit.nu
lime@feddit.nuJoined: 2024-08-21 |
it's a really cool proof of concept, and i hope to never encounter it in the wild. also, why is this organised with one function per file? |
||
| 4 | |||
|
Vulwsztyn
programming.dev
Vulwsztyn@programming.dev Joined: 2023-11-12 |
it's a really cool proof of concept, and i hope to never encounter it in the wild. also, why is this organised with one function per file?
Thank you. Remeda.js was organised like this. How would you organise it? |
||
| 1 | |||
lime!
feddit.nu
lime@feddit.nuJoined: 2024-08-21 |
Thank you. Remeda.js was organised like this. How would you organise it?
well... it's a bit hard to say considering that the sort of style this library encourages is pretty unpythonic. if i did something similar i'd probably make a wrapper type that has all the functionality as methods, which would necessarily require compartmentalisation. i'd probably break it up into one file fore everything with related functionality and compose the final type from that. |
||
| 3 | |||
| Post Reply |
Back to top |