News for hackers. Stuff that matters.
Re:Tqdm (Python) by MichaelMoser123 on Thursday December 16, 2021 @08:11PM (#29586419)
https://github.com/keleshev/schema a library for validating python data structures by schema definitions, gave me a wow moment. (i have a slightly less original one here: https://github.com/MoserMichael/kwchecker )
Re:Tqdm (Python) by ehsankia on Friday December 17, 2021 @12:00AM (#29587985)
Love the idea of Schema, but not a fan of that syntax, doesn't seem Pythonic to me, seems more like something you'd see out of Javascript word.

Like looking at that very first example, I have no clue what "len" means in that context. Is it implicitly checking that it's not an empty string? Then on the next line, how come `int` has `Use()` around it, but on the previous line `str` didn't? I guess that int is being used as a converter, line on the next line with str.lower, but the str was being used as a type check?

Not a fan of that API.