Hi. I am working on a kinda-ORM library, which usage often implies to request
data within specific ranges:
Foobar.search(
attr1="foo",
attr2=gt(10),
attr3=between(42, 50)
)
The use of "gt" or "between" methods to describe those operations feels a bit
cumbersome
This is how slices are used in the python standard library, indeed, but that
does not stop me from interpreting the slices as "inclusive by default" in my
library.
The inconsistency with the rest of the python standard library could be
misleading, but I think maybe less than off-by-1 errors?
Yo
Definitively not as short as what I suggested, but I love it. I think this is
one of the cleanest way I can do right now. Thanks!
___
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https