←back to thread

87 points mkalioby | 1 comments | | HN request time: 0.209s | source
Show context
abdullahkhalids ◴[] No.42190985[source]
I don't understand why numeric filters are included. The library is written in python, so shouldn't a lambda function based filter be roughly as fast but much easier/clearer to write.
replies(2): >>42191496 #>>42192896 #
MathMonkeyMan ◴[] No.42191496[source]
I'm not the author, but this implementation has the benefit of being a JSON compatible DSL that you can serialize. Maybe that's intentional, maybe not.

It does look like Python's comprehensions would be a better choice if you're writing them by hand anyway.

replies(2): >>42194918 #>>42195011 #
1. mkalioby ◴[] No.42195011[source]
Sure, we wrote this to filter Json data based on user provided values in a search form.